incubator-stonehenge-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bende...@apache.org
Subject svn commit: r801507 [4/8] - in /incubator/stonehenge/contrib/stocktrader/metro: ./ business_service/ business_service/config/ business_service/etc/ business_service/etc/order_processor/ business_service/lib/ business_service/src/ business_service/src/o...
Date Thu, 06 Aug 2009 03:41:20 GMT
Added: incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/dal/ConfigServiceDAOImpl.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/dal/ConfigServiceDAOImpl.java?rev=801507&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/dal/ConfigServiceDAOImpl.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/dal/ConfigServiceDAOImpl.java Thu Aug  6 03:41:14 2009
@@ -0,0 +1,284 @@
+package org.apache.stonehenge.stocktrader.dal;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.datacontract.schemas._2004._07.trade.BSConfigResponse;
+import org.datacontract.schemas._2004._07.trade.ClientConfigResponse;
+import org.datacontract.schemas._2004._07.trade.OPSConfigResponse;
+import org.datacontract.schemas._2004._07.trade.ServiceLocation;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ConfigServiceDAOImpl implements ConfigServiceDAO {
+    private static Log logger = LogFactory.getLog(ConfigServiceDAOImpl.class);
+
+    public ConfigServiceDAOImpl() {
+    }
+
+    public void setConnection(Connection connection) {
+        if (this.connection != null) {
+            this.connection = null;
+        }
+        this.connection = connection;
+    }
+
+    private Connection connection;
+
+    private static final String SQL_SELECT_BSLOCATION_FROM_SERVICE = "SELECT servicename,url FROM [SERVICE] WHERE SERVICENAME LIKE '%_BS'";
+    private static final String SQL_SELECT_OPSLOCATION_FROM_SERVICE = "SELECT servicename,url FROM [SERVICE] WHERE SERVICENAME LIKE '%_OPS%'";
+    private static final String SQL_INSERT_VALUE_INTO_CLIENT_TO_BS = "INSERT INTO CLIENTTOBS (CLIENT , BS) VALUES (?,?);";
+    private static final String SQL_UPDATE_CLIENT_TO_BS = "UPDATE CLIENTTOBS SET BS=? WHERE CLIENT = ?;";
+    private static final String SQL_INSERT_VALUE_INTO_BS_TO_OPS = "INSERT INTO BSTOOPS (BS, OPS) VALUES (?,?);";
+    private static final String SQL_UPDATE_BS_TO_OPS = "UPDATE BSTOOPS SET OPS=? WHERE BS  = ?;";
+    private static final String SQL_SELECT_BSSERVICE_ADDRESS_BY_ClIENTNAME = "SELECT servicename,url,sec FROM [SERVICE] INNER JOIN CLIENTTOBS ON [SERVICE].SERVICENAME = CLIENTTOBS.BS  WHERE CLIENT=?";
+    private static final String SQL_SELECT_OPSSERVICE_ADDRESS_BY_CLIENTNAME = "SELECT servicename,url,sec,DBNAME, HOSTNAME,PORT FROM [SERVICE] INNER JOIN BSTOOPS ON [SERVICE].SERVICENAME = BSTOOPS.OPS CROSS JOIN DBCONFIG WHERE BSTOOPS.BS=?";
+    private static final String SQL_SELECT_FROM_CLIENTTOBS = "SELECT * FROM CLIENTTOBS WHERE CLIENT = ?;";
+    private static final String SQL_SELECT_FROM_BSTOOPS = "SELECT * FROM BSTOOPS WHERE BS = ?;";
+    private static final String SQL_SELECT_OPS_CONFIG = "SELECT * FROM DBCONFIG;";
+
+    public List<ServiceLocation> getBSLocations() {
+        return (List<ServiceLocation>) executeQuery(new SimpleStatementPopulator(SQL_SELECT_BSLOCATION_FROM_SERVICE),
+                new ServiceResultSetExtractor());
+    }
+
+    public List<ServiceLocation> getOPSLocations() {
+        return (List<ServiceLocation>) executeQuery(new SimpleStatementPopulator(SQL_SELECT_OPSLOCATION_FROM_SERVICE),
+                new ServiceResultSetExtractor());
+    }
+
+    public BSConfigResponse getBSConfig(String bsName) {
+        return (BSConfigResponse) executeQuery(
+                new SimpleStatementPopulator(SQL_SELECT_OPSSERVICE_ADDRESS_BY_CLIENTNAME, bsName),
+                new BSConfigResponseResultSetExtractor());
+    }
+
+    public ClientConfigResponse getClientConfig(String clientName) {
+        return (ClientConfigResponse) executeQuery(
+                new SimpleStatementPopulator(SQL_SELECT_BSSERVICE_ADDRESS_BY_ClIENTNAME, clientName),
+                new ClientConfigResponseResultSetExtractor());
+    }
+
+    public boolean setClientToBS(String clientName, String bsName) {
+        return executeTransaction(new SetClientToBSTransactionCallback(clientName, bsName));
+    }
+
+    public boolean setBSToOPS(String bs, String ops) {
+        return executeTransaction(new SetBSToOPSTransactionCallback(bs, ops));
+    }
+
+    public OPSConfigResponse getOPSConfig(String opsName) {
+        return (OPSConfigResponse) executeQuery(new SimpleStatementPopulator(SQL_SELECT_OPS_CONFIG),
+                new OPSConfigResponseResultSetExtractor());
+    }
+
+    abstract class AbstractTransactionCallback implements TransactionCallback {
+        protected final String firstPara;
+        protected final String secondPara;
+
+        AbstractTransactionCallback(
+                String first, String second) {
+            firstPara = first;
+            secondPara = second;
+        }
+
+        protected boolean checkUpdateStatus(Connection connection, String sqlSelectFromClienttobs,
+                                            String clientName) throws SQLException {
+            PreparedStatement statement1 = new SimpleStatementPopulator(sqlSelectFromClienttobs, clientName)
+                    .populateStatement(connection);
+            ResultSet resultSet = statement1.executeQuery();
+            boolean hasEntry = resultSet.next();
+            return hasEntry;
+        }
+
+        protected void executeUpdate(Connection connection, String updateClientToBs, String bsName,
+                                     String clientName) throws SQLException {
+            PreparedStatement statement2 = new SimpleStatementPopulator(updateClientToBs, bsName, clientName)
+                    .populateStatement(connection);
+            statement2.executeUpdate();
+        }
+
+        protected void executeInsert(Connection connection, String insertValueIntoClientToBs, String clientName,
+                                     String bsName) throws SQLException {
+            PreparedStatement statement3 = new SimpleStatementPopulator(insertValueIntoClientToBs,
+                    clientName, bsName).populateStatement(connection);
+            statement3.executeUpdate();
+        }
+    }
+
+    class SetClientToBSTransactionCallback extends AbstractTransactionCallback {
+        SetClientToBSTransactionCallback(String first, String second) {
+            super(first, second);
+        }
+
+        public void executeTransaction(Connection connection) throws SQLException {
+            boolean hasEntry = checkUpdateStatus(connection, SQL_SELECT_FROM_CLIENTTOBS, firstPara);
+            if (hasEntry) {
+                executeUpdate(connection, SQL_UPDATE_CLIENT_TO_BS, secondPara, firstPara);
+            } else {
+                executeInsert(connection, SQL_INSERT_VALUE_INTO_CLIENT_TO_BS, firstPara, secondPara);
+            }
+        }
+    }
+
+    class SetBSToOPSTransactionCallback extends AbstractTransactionCallback {
+
+        SetBSToOPSTransactionCallback(String first, String second) {
+            super(first, second);
+        }
+
+        public void executeTransaction(Connection connection) throws SQLException {
+            boolean hasEntry = checkUpdateStatus(connection, SQL_SELECT_FROM_BSTOOPS, firstPara);
+            if (hasEntry) {
+                executeUpdate(connection, SQL_UPDATE_BS_TO_OPS, secondPara, firstPara);
+            } else {
+                executeInsert(connection, SQL_INSERT_VALUE_INTO_BS_TO_OPS, firstPara, secondPara);
+            }
+        }
+    }
+
+    private class SimpleStatementPopulator {
+        private final String sql;
+        private final Object[] params;
+
+        private SimpleStatementPopulator(String sql, Object... params) {
+            this.sql = sql;
+            this.params = params;
+        }
+
+        public PreparedStatement populateStatement(Connection connection) throws
+                SQLException {
+            PreparedStatement preparedStatement = connection.prepareStatement(sql);
+            int index = 1;
+            for (Object param : params) {
+                preparedStatement.setObject(index++, param);
+            }
+            return preparedStatement;
+        }
+
+    }
+
+    class ServiceResultSetExtractor implements ResultSetExtractor<List<ServiceLocation>> {
+
+        public List<ServiceLocation> extractResultSet(ResultSet rs) throws SQLException {
+            List<ServiceLocation> serviceLocations = new ArrayList<ServiceLocation>();
+            while (rs.next()) {
+                ServiceLocation serviceLocation = new ServiceLocation();
+                serviceLocation.setServiceName(rs.getString("serviceName"));
+                serviceLocation.setServiceURL(rs.getString("url"));
+                serviceLocations.add(serviceLocation);
+            }
+            return serviceLocations;
+        }
+
+    }
+
+    class OPSConfigResponseResultSetExtractor implements ResultSetExtractor<OPSConfigResponse> {
+        public OPSConfigResponse extractResultSet(ResultSet rs) throws SQLException {
+            OPSConfigResponse response = new OPSConfigResponse();
+            while (rs.next()) {
+                response.setDBName(rs.getString("dbname"));
+                response.setDBHostName(rs.getString("hostname"));
+                response.setDBPort(rs.getInt("port"));
+            }
+            return response;
+        }
+    }
+
+    class ClientConfigResponseResultSetExtractor implements ResultSetExtractor<ClientConfigResponse> {
+        public ClientConfigResponse extractResultSet(ResultSet rs) throws SQLException {
+            ClientConfigResponse response = new ClientConfigResponse();
+            while (rs.next()) {
+                response.setBSName(rs.getString("serviceName"));
+                response.setBS(rs.getString("url"));
+                response.setSec(rs.getBoolean("sec"));
+            }
+            return response;
+        }
+    }
+
+    class BSConfigResponseResultSetExtractor implements ResultSetExtractor<BSConfigResponse> {
+
+        public BSConfigResponse extractResultSet(ResultSet rs) throws SQLException {
+            BSConfigResponse response = new BSConfigResponse();
+            while (rs.next()) {
+                response.setOPSName(rs.getString("serviceName"));
+                response.setOPS(rs.getString("url"));
+                response.setSec(rs.getBoolean("sec"));
+                response.setDBName(rs.getString("dbname"));
+                response.setDBHostName(rs.getString("hostname"));
+                response.setDBPort(rs.getInt("port"));
+            }
+            return response;
+        }
+    }
+
+    private interface ResultSetExtractor<T> {
+        T extractResultSet(ResultSet rs) throws SQLException;
+    }
+
+    private Object executeQuery(SimpleStatementPopulator stPopulator, ResultSetExtractor rsExtractor) {
+        Object result = null;
+        ResultSet rs = null;
+        try {
+            PreparedStatement statement = stPopulator.populateStatement(connection);
+            rs = statement.executeQuery();
+            result = rsExtractor.extractResultSet(rs);
+        } catch (SQLException exception) {
+            logger.error(exception, exception);
+        }
+        finally {
+            try {
+                if (rs != null) {
+                    rs.close();
+                }
+                try {
+                    if (connection != null && !connection.isClosed()) {
+                        connection.close();
+                    }
+                } catch (SQLException e) {
+                    e.printStackTrace();
+                }
+            } catch (SQLException exception) {
+                logger.error(exception, exception);
+            }
+        }
+        return result;
+    }
+
+    interface TransactionCallback {
+        void executeTransaction(Connection connection) throws SQLException;
+    }
+
+    private boolean executeTransaction(TransactionCallback transactionCallback) {
+        try {
+            connection.setAutoCommit(false);
+
+            transactionCallback.executeTransaction(connection);
+
+            connection.commit();
+            return true;
+        } catch (SQLException e) {
+            try {
+                connection.rollback();
+            } catch (SQLException e1) {
+                e1.printStackTrace();
+            }
+            logger.error(e, e);
+            return false;
+        } finally {
+            try {
+                connection.setAutoCommit(true);
+                if (connection != null && !connection.isClosed()) {
+                    connection.close();
+                }
+            } catch (SQLException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/dal/ConnectionProvider.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/dal/ConnectionProvider.java?rev=801507&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/dal/ConnectionProvider.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/dal/ConnectionProvider.java Thu Aug  6 03:41:14 2009
@@ -0,0 +1,16 @@
+package org.apache.stonehenge.stocktrader.dal;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.Properties;
+
+public interface ConnectionProvider {
+
+    String PROP_DB_HOST = "org.apache.stonehenge.stocktrader.database.host";
+    String PROP_DB_PORT = "org.apache.stonehenge.stocktrader.database.port";
+    String PROP_DB_NAME = "org.apache.stonehenge.stocktrader.database.db";
+    String PROP_DB_USER = "org.apache.stonehenge.stocktrader.database.user";
+    String PROP_DB_PASSWORD = "org.apache.stonehenge.stocktrader.database.password";
+
+    Connection provide(Properties properties) throws SQLException;
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/dal/DAOFactory.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/dal/DAOFactory.java?rev=801507&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/dal/DAOFactory.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/dal/DAOFactory.java Thu Aug  6 03:41:14 2009
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.stonehenge.stocktrader.dal;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stonehenge.stocktrader.mssql.MSSQLConnectionProvider;
+import org.apache.stonehenge.stocktrader.mysql.MySQLConnectionProvider;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.Properties;
+
+public final class DAOFactory {
+    private static final String PROP_DB_TYPE = "org.apache.stonehenge.stocktrader.database.type";
+
+    private static Properties prop = null;
+    private static ConnectionProvider connectionProvider;
+    private static DAOFactory self;
+    private ConfigServiceDAOImpl configServiceDAO;
+
+    private DAOFactory() {
+        configServiceDAO = new ConfigServiceDAOImpl();
+        loadProperties();
+    }
+
+    public static DAOFactory getFacotry() {
+        if (self == null) {
+            self = new DAOFactory();
+        }
+        return self;
+    }
+
+    public ConfigServiceDAO getConfigServiceDAO() {
+        if ("mysql".equals(prop.getProperty(PROP_DB_TYPE))) {
+            connectionProvider = new MySQLConnectionProvider();
+        } else if ("mssql".equals(prop.getProperty(PROP_DB_TYPE))) {
+            connectionProvider = new MSSQLConnectionProvider();
+        } else {
+            throw new IllegalArgumentException("Unknown Database type " + prop.getProperty(PROP_DB_TYPE));
+        }
+        Connection connection;
+        try {
+            connection = connectionProvider.provide(prop);
+        } catch (SQLException e) {
+            e.printStackTrace();
+            throw new RuntimeException(e.getMessage(), e);
+        }
+        configServiceDAO.setConnection(connection);
+        return configServiceDAO;
+    }
+
+    private static void loadProperties() {
+        Log logger = LogFactory.getLog(DAOFactory.class);
+        if (prop == null) {
+            prop = new Properties();
+
+            InputStream is = DAOFactory.class.getClassLoader().getResourceAsStream("db.properties");
+            if (is != null) {
+                try {
+                    prop.load(is);
+                } catch (IOException e) {
+                    logger.debug(
+                            "Unable to load mysql-db properties file and using [jdbc:mysql://localhost/stocktraderdb?user=trade&password=trade] as the default connection",
+                            e);
+                }
+            } else {
+                logger.debug(
+                        "Unable to load mysql-db properties file and using [jdbc:mysql://localhost/stocktraderdb?user=trade&password=trade] as the default connection");
+
+            }
+        }
+    }
+
+}
\ No newline at end of file

Added: incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/mssql/MSSQLConnectionProvider.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/mssql/MSSQLConnectionProvider.java?rev=801507&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/mssql/MSSQLConnectionProvider.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/mssql/MSSQLConnectionProvider.java Thu Aug  6 03:41:14 2009
@@ -0,0 +1,54 @@
+package org.apache.stonehenge.stocktrader.mssql;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.stonehenge.stocktrader.dal.ConnectionProvider;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.Properties;
+
+public class MSSQLConnectionProvider implements ConnectionProvider {
+    private static Log logger = LogFactory.getLog(MSSQLConnectionProvider.class);
+    private Connection sqlConnection = null;
+    private String connection = null;
+
+    static {
+        try {
+            Class.forName("net.sourceforge.jtds.jdbc.Driver");
+        } catch (ClassNotFoundException e) {
+            logger.warn("Unable to load DBDrive class", e);
+        }
+    }
+
+    private String getConnectionString(Properties prop) {
+        if (connection == null) {
+            if (prop == null) {
+                connection = "jdbc:jtds:sqlserver://highlander:1433/StockTraderDB;user=trade;password=trade";
+            } else {
+                StringBuffer buf = new StringBuffer();
+                buf.append("jdbc:jtds:sqlserver://");
+                buf.append(prop.getProperty(PROP_DB_HOST));
+                buf.append(":" + prop.getProperty(PROP_DB_PORT));
+                buf.append("/" + prop.getProperty(PROP_DB_NAME));
+                buf.append(";user=" + prop.getProperty(PROP_DB_USER));
+                buf.append(";password=" + prop.getProperty(PROP_DB_PASSWORD));
+                buf.append(";");
+                connection = buf.toString();
+            }
+        }
+        if (logger.isDebugEnabled()) {
+            logger.debug("MSSQLDAOFactory.getConnectionString()\nConnection :" + connection);
+        }
+
+        return connection;
+    }
+
+    public Connection provide(Properties properties) throws SQLException {
+        if (sqlConnection == null || sqlConnection.isClosed()) {
+            sqlConnection = DriverManager.getConnection(getConnectionString(properties));
+        }
+        return sqlConnection;
+    }
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/mysql/MySQLConnectionProvider.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/mysql/MySQLConnectionProvider.java?rev=801507&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/mysql/MySQLConnectionProvider.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/mysql/MySQLConnectionProvider.java Thu Aug  6 03:41:14 2009
@@ -0,0 +1,54 @@
+package org.apache.stonehenge.stocktrader.mysql;
+
+import org.apache.stonehenge.stocktrader.dal.ConnectionProvider;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.DriverManager;
+import java.util.Properties;
+
+public class MySQLConnectionProvider implements ConnectionProvider{
+
+    private static Log logger = LogFactory.getLog(MySQLConnectionProvider.class);
+    private Connection sqlConnection = null;
+    private String connection = null;
+
+    static {
+        try {
+            Class.forName("com.mysql.jdbc.Driver");
+        } catch (ClassNotFoundException e) {
+            logger.warn("Unable to load DBDrive class", e);
+        }
+    }
+
+    private String getConnectionString(Properties prop) {
+        if (connection == null) {
+			if (prop == null || prop.size()<=0) {
+                connection = "jdbc:mysql://localhost:3306/stocktraderdb?user=trade&password=yyy";
+            } else {
+                StringBuffer buf = new StringBuffer();
+                buf.append("jdbc:mysql://");
+                buf.append(prop.getProperty(PROP_DB_HOST));
+                buf.append(":" + prop.getProperty(PROP_DB_PORT));
+                buf.append("/" + prop.getProperty(PROP_DB_NAME));
+                buf.append("?user=" + prop.getProperty(PROP_DB_USER));
+                buf.append("&password=" + prop.getProperty(PROP_DB_PASSWORD));
+                connection = buf.toString();
+            }
+        }
+
+        if (logger.isDebugEnabled()) {
+            logger.debug("MySQLDAOFactory.getConnectionString()\nConnection :" + connection);
+        }
+        return connection;
+    }
+
+    public Connection provide(Properties prop) throws SQLException {
+        if (sqlConnection == null || sqlConnection.isClosed()) {
+            sqlConnection = DriverManager.getConnection(getConnectionString(prop));
+        }
+        return sqlConnection;
+    }
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/services/ConfigServiceServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/services/ConfigServiceServiceImpl.java?rev=801507&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/services/ConfigServiceServiceImpl.java (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/config_service/src/org/apache/stonehenge/stocktrader/services/ConfigServiceServiceImpl.java Thu Aug  6 03:41:14 2009
@@ -0,0 +1,100 @@
+package org.apache.stonehenge.stocktrader.services;
+
+import org.apache.stonehenge.stocktrader.dal.ConfigServiceDAO;
+import org.apache.stonehenge.stocktrader.dal.DAOFactory;
+import org.datacontract.schemas._2004._07.trade.*;
+import org.tempuri.ConfigServiceService;
+import traderconfighost.trade.*;
+
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import java.util.List;
+
+@WebService(endpointInterface = "org.tempuri.ConfigServiceService")
+public class ConfigServiceServiceImpl implements ConfigServiceService {
+    private final DAOFactory facotry;
+
+    public ConfigServiceServiceImpl() {
+        facotry = DAOFactory.getFacotry();
+    }
+
+    public ConfigServiceDAO getConfigServiceDAO() {
+        return facotry.getConfigServiceDAO();
+    }
+
+    public GetClientConfigResponse getClientConfig(
+            @WebParam(name = "GetClientConfig", targetNamespace = "http://Trade.TraderConfigHost",
+                    partName = "parameters") GetClientConfig getClientConfig) {
+        GetClientConfigResponse clientConfigResponse = new GetClientConfigResponse();
+        String clientName = getClientConfig.getClient().getClientName();
+        ClientConfigResponse config = getConfigServiceDAO().getClientConfig(clientName);
+        clientConfigResponse.setGetClientConfigResult(config);
+        return clientConfigResponse;
+    }
+
+    public GetBSConfigResponse getBSConfig(
+            @WebParam(name = "GetBSConfig", targetNamespace = "http://Trade.TraderConfigHost",
+                    partName = "parameters") GetBSConfig getBSConfig) {
+        GetBSConfigResponse bsConfigResponse = new GetBSConfigResponse();
+        BSConfigResponse configResponse = getConfigServiceDAO().getBSConfig(getBSConfig.getBs().getBSName());
+        bsConfigResponse.setGetBSConfigResult(configResponse);
+        return bsConfigResponse;
+    }
+
+    public GetOPSConfigResponse getOPSConfig(
+            @WebParam(name = "GetOPSConfig", targetNamespace = "http://Trade.TraderConfigHost", partName =
+                    "parameters") GetOPSConfig parameters) {
+        OPSConfigResponse opsConfigResponse = getConfigServiceDAO().getOPSConfig(parameters.getOps().getOPSName());
+        GetOPSConfigResponse getOPSConfigResponse = new GetOPSConfigResponse();
+        getOPSConfigResponse.setGetOPSConfigResult(opsConfigResponse);
+        return getOPSConfigResponse;
+    }
+
+    public SetClientToBSResponse setClientToBS(
+            @WebParam(name = "SetClientToBS", targetNamespace = "http://Trade.TraderConfigHost",
+                    partName = "parameters") SetClientToBS setClientToBS) {
+        ClientToBS clientConfig = setClientToBS.getClientConfig();
+        if (getConfigServiceDAO().setClientToBS(clientConfig.getClient(), clientConfig.getBs())) {
+            return new SetClientToBSResponse();
+        }
+        return null;
+    }
+
+    public SetBSToOPSResponse setBSToOPS(
+            @WebParam(name = "SetBSToOPS", targetNamespace = "http://Trade.TraderConfigHost",
+                    partName = "parameters") SetBSToOPS setBSToOPS) {
+        BSToOPS bsConfig = setBSToOPS.getBsConfig();
+        if (getConfigServiceDAO().setBSToOPS(bsConfig.getBs(), bsConfig.getOps())) {
+            return new SetBSToOPSResponse();
+        }
+        return null;
+    }
+
+    public GetBSLocationsResponse getBSLocations(
+            @WebParam(name = "GetBSLocations", targetNamespace = "http://Trade.TraderConfigHost",
+                    partName = "parameters") GetBSLocations getBSLocations) {
+        final List<ServiceLocation> serviceLocations = getConfigServiceDAO().getBSLocations();
+        GetBSLocationsResponse getBSLocationsResponse = new GetBSLocationsResponse();
+        ArrayOfServiceLocation arrayOfServiceLocation = new ArrayOfServiceLocation();
+        arrayOfServiceLocation.getServiceLocation().addAll(serviceLocations);
+        getBSLocationsResponse.setGetBSLocationsResult(arrayOfServiceLocation);
+        return getBSLocationsResponse;
+    }
+
+    public GetOPSLocationsResponse getOPSLocations(
+            @WebParam(name = "GetOPSLocations", targetNamespace = "http://Trade.TraderConfigHost",
+                    partName = "parameters") GetOPSLocations getOPSLocations) {
+        List<ServiceLocation> serviceLocations = getConfigServiceDAO().getOPSLocations();
+        GetOPSLocationsResponse response = new GetOPSLocationsResponse();
+        ArrayOfServiceLocation arrayOfServiceLocation = new ArrayOfServiceLocation();
+        arrayOfServiceLocation.getServiceLocation().addAll(serviceLocations);
+        response.setGetOPSLocationsResult(arrayOfServiceLocation);
+        return response;
+    }
+
+    public SetServiceLocationResponse setServiceLocation(
+            @WebParam(name = "SetServiceLocation", targetNamespace = "http://Trade.TraderConfigHost", partName =
+                    "parameters") SetServiceLocation parameters) {
+        throw new UnsupportedOperationException("method unimplemented");
+    }
+}

Added: incubator/stonehenge/contrib/stocktrader/metro/documents/manual.doc
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/documents/manual.doc?rev=801507&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/stonehenge/contrib/stocktrader/metro/documents/manual.doc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/stonehenge/contrib/stocktrader/metro/etc/as.xml
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/etc/as.xml?rev=801507&r1=801506&r2=801507&view=diff
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/etc/as.xml (original)
+++ incubator/stonehenge/contrib/stocktrader/metro/etc/as.xml Thu Aug  6 03:41:14 2009
@@ -1,7 +1,19 @@
 <project name="as">
     <property environment="env"/>
+    <property file="${basedir}/../etc/build.properties"/>
     <property name="domain" value="domain1"/>
 
+    <property name="resource.dir" value="${basedir}/../etc"/>
+
+    <property name="business.service.binding.dir" value="${resource.dir}/${business.service.name}"/>
+    <property name="business.service.wsdl" value="${business.service.binding.dir}/${business.service.wsdl.name}"/>
+
+    <property name="order.processor.binding.dir" value="${resource.dir}/${order.processor.name}"/>
+    <property name="order.processor.wsdl" value="${order.processor.binding.dir}/${order.processor.wsdl.name}"/>
+
+    <property name="config.service.binding.dir" value="${resource.dir}/${config.service.name}"/>
+    <property name="config.service.wsdl" value="${config.service.binding.dir}/${config.service.wsdl.name}"/>
+
     <condition property="as.home" value="${env.AS_HOME}">
         <isset property="env.AS_HOME"/>
     </condition>

Added: incubator/stonehenge/contrib/stocktrader/metro/etc/build.properties
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/etc/build.properties?rev=801507&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/etc/build.properties (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/etc/build.properties Thu Aug  6 03:41:14 2009
@@ -0,0 +1,15 @@
+debug=false
+keep=true
+verbose=false
+
+business.service.name=business_service
+business.service.binding=custom-*.xml
+business.service.wsdl.name=TradeServiceWsas.wsdl
+
+order.processor.name=order_processor
+order.processor.binding=custom-*.xml
+order.processor.wsdl.name=OrderProcessor.wsdl
+
+config.service.name=config_service
+config.service.binding=custom-*.xml
+config.service.wsdl.name=ConfigService.wsdl

Added: incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/TradeServiceWsas.wsdl
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/TradeServiceWsas.wsdl?rev=801507&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/TradeServiceWsas.wsdl (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/TradeServiceWsas.wsdl Thu Aug  6 03:41:14 2009
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="TradeServiceWsas" targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:i0="http://trade.samples.websphere.ibm.com" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract">
+  <wsdl:import namespace="http://trade.samples.websphere.ibm.com" location="wsdl0.wsdl">
+    </wsdl:import>
+  <wsdl:types>
+  </wsdl:types>
+  <wsdl:binding name="BasicHttpBinding_ITradeServices" type="i0:ITradeServices">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
+    <wsdl:operation name="emptyMethodAction">
+      <soap:operation soapAction="" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="isOnline">
+      <soap:operation soapAction="isOnline" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+    </wsdl:operation>
+    <wsdl:operation name="login">
+      <soap:operation soapAction="http://trade.samples.websphere.ibm.com/ITradeServices/login" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getOrders">
+      <soap:operation soapAction="getOrders" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getAccountData">
+      <soap:operation soapAction="getAccountData" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getAccountProfileData">
+      <soap:operation soapAction="getAccountProfileData" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="updateAccountProfile">
+      <soap:operation soapAction="updateAccountProfile" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="logout">
+      <soap:operation soapAction="logout" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="buy">
+      <soap:operation soapAction="buy" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="sell">
+      <soap:operation soapAction="sell" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getHoldings">
+      <soap:operation soapAction="getHoldings" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="register">
+      <soap:operation soapAction="register" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getClosedOrders">
+      <soap:operation soapAction="getClosedOrders" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getMarketSummary">
+      <soap:operation soapAction="getMarketSummary" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getQuote">
+      <soap:operation soapAction="http://trade.samples.websphere.ibm.com/ITradeServices/getQuote" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getHolding">
+      <soap:operation soapAction="getHolding" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getTopOrders">
+      <soap:operation soapAction="getTopOrders" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="sellEnhanced">
+      <soap:operation soapAction="sellEnhanced" style="document"/>
+      <wsdl:input>
+        <soap:body use="literal"/>
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal"/>
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="TradeServiceWsas">
+    <wsdl:port name="BasicHttpBinding_ITradeServices" binding="tns:BasicHttpBinding_ITradeServices">
+      <soap:address location=""/>
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>

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

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

Added: incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/wsdl0.wsdl
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/wsdl0.wsdl?rev=801507&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/wsdl0.wsdl (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/wsdl0.wsdl Thu Aug  6 03:41:14 2009
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="http://trade.samples.websphere.ibm.com" xmlns:tns="http://trade.samples.websphere.ibm.com" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract">
+  <wsdl:types>
+    <xsd:schema targetNamespace="http://trade.samples.websphere.ibm.com/Imports">
+      <xsd:import namespace="http://trade.samples.websphere.ibm.com" schemaLocation="xsd0.xsd"/>
+      <xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" schemaLocation="xsd1.xsd"/>
+    </xsd:schema>
+  </wsdl:types>
+  <wsdl:message name="ITradeServices_getHolding_InputMessage">
+    <wsdl:part name="parameters" element="tns:getHolding">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_sellEnhanced_OutputMessage">
+    <wsdl:part name="parameters" element="tns:sellEnhancedResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_logout_InputMessage">
+    <wsdl:part name="parameters" element="tns:logout">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getAccountProfileData_InputMessage">
+    <wsdl:part name="parameters" element="tns:getAccountProfileData">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_updateAccountProfile_OutputMessage">
+    <wsdl:part name="parameters" element="tns:updateAccountProfileResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_isOnline_InputMessage">
+    <wsdl:part name="parameters" element="tns:isOnline">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_login_OutputMessage">
+    <wsdl:part name="parameters" element="tns:loginResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_register_InputMessage">
+    <wsdl:part name="parameters" element="tns:register">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getQuote_InputMessage">
+    <wsdl:part name="parameters" element="tns:getQuote">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getAccountData_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getAccountDataResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getClosedOrders_InputMessage">
+    <wsdl:part name="parameters" element="tns:getClosedOrders">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_logout_OutputMessage">
+    <wsdl:part name="parameters" element="tns:logoutResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_sell_InputMessage">
+    <wsdl:part name="parameters" element="tns:sell">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getMarketSummary_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getMarketSummaryResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getClosedOrders_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getClosedOrdersResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_emptyMethodAction_InputMessage">
+    <wsdl:part name="parameters" element="tns:emptyMethodAction">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_sellEnhanced_InputMessage">
+    <wsdl:part name="parameters" element="tns:sellEnhanced">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getMarketSummary_InputMessage">
+    <wsdl:part name="parameters" element="tns:getMarketSummary">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_login_InputMessage">
+    <wsdl:part name="parameters" element="tns:login">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getTopOrders_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getTopOrdersResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getAccountProfileData_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getAccountProfileDataResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_emptyMethodAction_OutputMessage">
+    <wsdl:part name="parameters" element="tns:emptyMethodActionResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getHoldings_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getHoldingsResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getQuote_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getQuoteResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getHoldings_InputMessage">
+    <wsdl:part name="parameters" element="tns:getHoldings">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getTopOrders_InputMessage">
+    <wsdl:part name="parameters" element="tns:getTopOrders">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_register_OutputMessage">
+    <wsdl:part name="parameters" element="tns:registerResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_updateAccountProfile_InputMessage">
+    <wsdl:part name="parameters" element="tns:updateAccountProfile">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getAccountData_InputMessage">
+    <wsdl:part name="parameters" element="tns:getAccountData">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getOrders_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getOrdersResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getHolding_OutputMessage">
+    <wsdl:part name="parameters" element="tns:getHoldingResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_getOrders_InputMessage">
+    <wsdl:part name="parameters" element="tns:getOrders">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_buy_InputMessage">
+    <wsdl:part name="parameters" element="tns:buy">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_buy_OutputMessage">
+    <wsdl:part name="parameters" element="tns:buyResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="ITradeServices_sell_OutputMessage">
+    <wsdl:part name="parameters" element="tns:sellResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="ITradeServices">
+    <wsdl:operation name="emptyMethodAction">
+      <wsdl:input message="tns:ITradeServices_emptyMethodAction_InputMessage" wsaw:Action="">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_emptyMethodAction_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/emptyMethodActionResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="isOnline">
+      <wsdl:input message="tns:ITradeServices_isOnline_InputMessage" wsaw:Action="isOnline">
+    </wsdl:input>
+    </wsdl:operation>
+    <wsdl:operation name="login">
+      <wsdl:input message="tns:ITradeServices_login_InputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/login">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_login_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/loginResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getOrders">
+      <wsdl:input message="tns:ITradeServices_getOrders_InputMessage" wsaw:Action="getOrders">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getOrders_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getOrdersResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getAccountData">
+      <wsdl:input message="tns:ITradeServices_getAccountData_InputMessage" wsaw:Action="getAccountData">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getAccountData_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getAccountDataResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getAccountProfileData">
+      <wsdl:input message="tns:ITradeServices_getAccountProfileData_InputMessage" wsaw:Action="getAccountProfileData">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getAccountProfileData_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getAccountProfileDataResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="updateAccountProfile">
+      <wsdl:input message="tns:ITradeServices_updateAccountProfile_InputMessage" wsaw:Action="updateAccountProfile">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_updateAccountProfile_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/updateAccountProfileResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="logout">
+      <wsdl:input message="tns:ITradeServices_logout_InputMessage" wsaw:Action="logout">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_logout_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/logoutResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="buy">
+      <wsdl:input message="tns:ITradeServices_buy_InputMessage" wsaw:Action="buy">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_buy_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/buyResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="sell">
+      <wsdl:input message="tns:ITradeServices_sell_InputMessage" wsaw:Action="sell">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_sell_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/sellResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getHoldings">
+      <wsdl:input message="tns:ITradeServices_getHoldings_InputMessage" wsaw:Action="getHoldings">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getHoldings_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getHoldingsResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="register">
+      <wsdl:input message="tns:ITradeServices_register_InputMessage" wsaw:Action="register">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_register_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/registerResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getClosedOrders">
+      <wsdl:input message="tns:ITradeServices_getClosedOrders_InputMessage" wsaw:Action="getClosedOrders">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getClosedOrders_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getClosedOrdersResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getMarketSummary">
+      <wsdl:input message="tns:ITradeServices_getMarketSummary_InputMessage" wsaw:Action="getMarketSummary">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getMarketSummary_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getMarketSummaryResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getQuote">
+      <wsdl:input message="tns:ITradeServices_getQuote_InputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getQuote">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getQuote_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getQuoteResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getHolding">
+      <wsdl:input message="tns:ITradeServices_getHolding_InputMessage" wsaw:Action="getHolding">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getHolding_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getHoldingResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="getTopOrders">
+      <wsdl:input message="tns:ITradeServices_getTopOrders_InputMessage" wsaw:Action="getTopOrders">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_getTopOrders_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/getTopOrdersResponse">
+    </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="sellEnhanced">
+      <wsdl:input message="tns:ITradeServices_sellEnhanced_InputMessage" wsaw:Action="sellEnhanced">
+    </wsdl:input>
+      <wsdl:output message="tns:ITradeServices_sellEnhanced_OutputMessage" wsaw:Action="http://trade.samples.websphere.ibm.com/ITradeServices/sellEnhancedResponse">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+</wsdl:definitions>

Added: incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/xsd0.xsd
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/xsd0.xsd?rev=801507&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/xsd0.xsd (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/xsd0.xsd Thu Aug  6 03:41:14 2009
@@ -0,0 +1,355 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://trade.samples.websphere.ibm.com" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://trade.samples.websphere.ibm.com">
+    <xs:element name="emptyMethodAction">
+        <xs:complexType>
+            <xs:sequence/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="emptyMethodActionResponse">
+        <xs:complexType>
+            <xs:sequence/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="isOnline">
+        <xs:complexType>
+            <xs:sequence/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="login">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="password" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="loginResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="loginReturn" nillable="true" type="tns:AccountDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="AccountDataBean">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="accountID" type="xs:int"/>
+            <xs:element minOccurs="0" name="loginCount" type="xs:int"/>
+            <xs:element minOccurs="0" name="logoutCount" type="xs:int"/>
+            <xs:element minOccurs="0" name="lastLogin" type="xs:dateTime"/>
+            <xs:element minOccurs="0" name="creationDate" type="xs:dateTime"/>
+            <xs:element minOccurs="0" name="balance" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="openBalance" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="profileID" nillable="true" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="AccountDataBean" nillable="true" type="tns:AccountDataBean"/>
+    <xs:complexType name="OrderDataBean">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="orderID" type="xs:int"/>
+            <xs:element minOccurs="0" name="orderType" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="orderStatus" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="openDate" type="xs:dateTime"/>
+            <xs:element minOccurs="0" name="completionDate" type="xs:dateTime"/>
+            <xs:element minOccurs="0" name="quantity" type="xs:double"/>
+            <xs:element minOccurs="0" name="price" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="orderFee" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="symbol" nillable="true" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="OrderDataBean" nillable="true" type="tns:OrderDataBean"/>
+    <xs:element name="getOrders">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getOrdersResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getOrdersReturn" nillable="true" type="tns:ArrayOfOrderDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="ArrayOfOrderDataBean">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="OrderDataBean" nillable="true" type="tns:OrderDataBean"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="ArrayOfOrderDataBean" nillable="true" type="tns:ArrayOfOrderDataBean"/>
+    <xs:element name="getAccountData">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getAccountDataResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getAccountDataReturn" nillable="true" type="tns:AccountDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getAccountProfileData">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getAccountProfileDataResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getAccountProfileDataReturn" nillable="true" type="tns:AccountProfileDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="AccountProfileDataBean">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="password" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="fullName" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="address" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="email" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="creditCard" nillable="true" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="AccountProfileDataBean" nillable="true" type="tns:AccountProfileDataBean"/>
+    <xs:element name="updateAccountProfile">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="profileData" nillable="true" type="tns:AccountProfileDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="updateAccountProfileResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="updateAccountProfileReturn" nillable="true" type="tns:AccountProfileDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="logout">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="logoutResponse">
+        <xs:complexType>
+            <xs:sequence/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="buy">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="symbol" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="quantity" type="xs:double"/>
+                <xs:element minOccurs="0" name="orderProcessingMode" type="xs:int"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="buyResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="buyReturn" nillable="true" type="tns:OrderDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="sell">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="holdingID" type="xs:int"/>
+                <xs:element minOccurs="0" name="orderProcessingMode" type="xs:int"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="sellResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="sellReturn" nillable="true" type="tns:OrderDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="HoldingDataBean">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="holdingID" type="xs:int"/>
+            <xs:element minOccurs="0" name="quantity" type="xs:double"/>
+            <xs:element minOccurs="0" name="purchasePrice" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="purchaseDate" type="xs:dateTime"/>
+            <xs:element minOccurs="0" name="quoteID" nillable="true" type="xs:string"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="HoldingDataBean" nillable="true" type="tns:HoldingDataBean"/>
+    <xs:element name="getHoldings">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getHoldingsResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getHoldingsReturn" nillable="true" type="tns:ArrayOfHoldingDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="ArrayOfHoldingDataBean">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="HoldingDataBean" nillable="true" type="tns:HoldingDataBean"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="ArrayOfHoldingDataBean" nillable="true" type="tns:ArrayOfHoldingDataBean"/>
+    <xs:element name="register">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="password" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="fullname" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="address" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="email" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="creditcard" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="openBalance" type="xs:decimal"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="registerResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="registerReturn" nillable="true" type="tns:AccountDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getClosedOrders">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getClosedOrdersResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getClosedOrdersReturn" nillable="true" type="tns:ArrayOfOrderDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="QuoteDataBean">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="symbol" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="companyName" nillable="true" type="xs:string"/>
+            <xs:element minOccurs="0" name="price" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="open" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="low" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="high" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="change" type="xs:double"/>
+            <xs:element minOccurs="0" name="volume" type="xs:double"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="QuoteDataBean" nillable="true" type="tns:QuoteDataBean"/>
+    <xs:element name="getMarketSummary">
+        <xs:complexType>
+            <xs:sequence/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getMarketSummaryResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getMarketSummaryReturn" nillable="true" type="tns:MarketSummaryDataBeanWS"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:complexType name="MarketSummaryDataBeanWS">
+        <xs:sequence>
+            <xs:element minOccurs="0" name="TSIA" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="openTSIA" type="xs:decimal"/>
+            <xs:element minOccurs="0" name="volume" type="xs:double"/>
+            <xs:element minOccurs="0" name="topGainers" nillable="true" type="tns:ArrayOfQuoteDataBean">
+                <xs:annotation>
+                    <xs:appinfo>
+                        <DefaultValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/" EmitDefaultValue="false"/>
+                    </xs:appinfo>
+                </xs:annotation>
+            </xs:element>
+            <xs:element minOccurs="0" name="topLosers" nillable="true" type="tns:ArrayOfQuoteDataBean">
+                <xs:annotation>
+                    <xs:appinfo>
+                        <DefaultValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/" EmitDefaultValue="false"/>
+                    </xs:appinfo>
+                </xs:annotation>
+            </xs:element>
+            <xs:element minOccurs="0" name="summaryDate" type="xs:dateTime"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="MarketSummaryDataBeanWS" nillable="true" type="tns:MarketSummaryDataBeanWS"/>
+    <xs:complexType name="ArrayOfQuoteDataBean">
+        <xs:sequence>
+            <xs:element maxOccurs="unbounded" minOccurs="0" name="QuoteDataBean" nillable="true" type="tns:QuoteDataBean"/>
+        </xs:sequence>
+    </xs:complexType>
+    <xs:element name="ArrayOfQuoteDataBean" nillable="true" type="tns:ArrayOfQuoteDataBean"/>
+    <xs:element name="getQuote">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="symbol" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getQuoteResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getQuoteReturn" nillable="true" type="tns:QuoteDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getHolding">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="holdingID" type="xs:int"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getHoldingResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getHoldingReturn" nillable="true" type="tns:HoldingDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getTopOrders">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="getTopOrdersResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="getTopOrdersReturn" nillable="true" type="tns:ArrayOfOrderDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="sellEnhanced">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="userID" nillable="true" type="xs:string"/>
+                <xs:element minOccurs="0" name="holdingID" type="xs:int"/>
+                <xs:element minOccurs="0" name="quantity" type="xs:double"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="sellEnhancedResponse">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" name="sellEnhancedReturn" nillable="true" type="tns:OrderDataBean"/>
+            </xs:sequence>
+        </xs:complexType>
+    </xs:element>
+</xs:schema>

Added: incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/xsd1.xsd
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/xsd1.xsd?rev=801507&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/xsd1.xsd (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/etc/business_service/xsd1.xsd Thu Aug  6 03:41:14 2009
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/">
+    <xs:element name="anyType" nillable="true" type="xs:anyType"/>
+    <xs:element name="anyURI" nillable="true" type="xs:anyURI"/>
+    <xs:element name="base64Binary" nillable="true" type="xs:base64Binary"/>
+    <xs:element name="boolean" nillable="true" type="xs:boolean"/>
+    <xs:element name="byte" nillable="true" type="xs:byte"/>
+    <xs:element name="dateTime" nillable="true" type="xs:dateTime"/>
+    <xs:element name="decimal" nillable="true" type="xs:decimal"/>
+    <xs:element name="double" nillable="true" type="xs:double"/>
+    <xs:element name="float" nillable="true" type="xs:float"/>
+    <xs:element name="int" nillable="true" type="xs:int"/>
+    <xs:element name="long" nillable="true" type="xs:long"/>
+    <xs:element name="QName" nillable="true" type="xs:QName"/>
+    <xs:element name="short" nillable="true" type="xs:short"/>
+    <xs:element name="string" nillable="true" type="xs:string"/>
+    <xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte"/>
+    <xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt"/>
+    <xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong"/>
+    <xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort"/>
+    <xs:element name="char" nillable="true" type="tns:char"/>
+    <xs:simpleType name="char">
+        <xs:restriction base="xs:int"/>
+    </xs:simpleType>
+    <xs:element name="duration" nillable="true" type="tns:duration"/>
+    <xs:simpleType name="duration">
+        <xs:restriction base="xs:duration">
+            <xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
+            <xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
+            <xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:element name="guid" nillable="true" type="tns:guid"/>
+    <xs:simpleType name="guid">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:attribute name="FactoryType" type="xs:QName"/>
+</xs:schema>

Added: incubator/stonehenge/contrib/stocktrader/metro/etc/config_service/ConfigService.wsdl
URL: http://svn.apache.org/viewvc/incubator/stonehenge/contrib/stocktrader/metro/etc/config_service/ConfigService.wsdl?rev=801507&view=auto
==============================================================================
--- incubator/stonehenge/contrib/stocktrader/metro/etc/config_service/ConfigService.wsdl (added)
+++ incubator/stonehenge/contrib/stocktrader/metro/etc/config_service/ConfigService.wsdl Thu Aug  6 03:41:14 2009
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions name="ConfigService" targetNamespace="http://tempuri.org/"
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+                  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+                  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+                  xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/"
+                  xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
+                  xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:i0="http://Trade.TraderConfigHost"
+                  xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"
+                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+                  xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
+                  xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
+                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+                  xmlns:wsa10="http://www.w3.org/2005/08/addressing"
+                  xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
+    <wsdl:import namespace="http://Trade.TraderConfigHost" location="wsdl0.wsdl"/>
+    <wsdl:types/>
+    <wsdl:binding name="BasicHttpBinding_ConfigServiceService" type="i0:ConfigServiceService">
+        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="GetClientConfig">
+            <soap:operation soapAction="http://Trade.TraderConfigHost/ConfigServiceService/GetClientConfig"
+                            style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="GetBSConfig">
+            <soap:operation soapAction="http://Trade.TraderConfigHost/ConfigServiceService/GetBSConfig"
+                            style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="GetOPSConfig">
+            <soap:operation soapAction="http://Trade.TraderConfigHost/ConfigServiceService/GetOPSConfig"
+                            style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="SetClientToBS">
+            <soap:operation soapAction="ClientToBS" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="SetBSToOPS">
+            <soap:operation soapAction="BSToOPS" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="GetBSLocations">
+            <soap:operation soapAction="http://Trade.TraderConfigHost/ConfigServiceService/GetBSLocations"
+                            style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="GetOPSLocations">
+            <soap:operation soapAction="http://Trade.TraderConfigHost/ConfigServiceService/GetOPSLocations"
+                            style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="SetServiceLocation">
+            <soap:operation soapAction="ServiceLocation" style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="ConfigService">
+        <wsdl:port name="BasicHttpBinding_ConfigServiceService" binding="tns:BasicHttpBinding_ConfigServiceService">
+            <soap:address location="http://localhost:8080/config_service/ConfigService"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file



Mime
View raw message