From stonehenge-commits-return-320-apmail-incubator-stonehenge-commits-archive=incubator.apache.org@incubator.apache.org Thu Apr 30 22:40:53 2009 Return-Path: Delivered-To: apmail-incubator-stonehenge-commits-archive@minotaur.apache.org Received: (qmail 31400 invoked from network); 30 Apr 2009 22:40:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Apr 2009 22:40:52 -0000 Received: (qmail 23262 invoked by uid 500); 30 Apr 2009 22:40:52 -0000 Delivered-To: apmail-incubator-stonehenge-commits-archive@incubator.apache.org Received: (qmail 23234 invoked by uid 500); 30 Apr 2009 22:40:52 -0000 Mailing-List: contact stonehenge-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stonehenge-dev@incubator.apache.org Delivered-To: mailing list stonehenge-commits@incubator.apache.org Received: (qmail 23224 invoked by uid 99); 30 Apr 2009 22:40:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2009 22:40:52 +0000 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2009 22:40:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5DAFA2388B68; Thu, 30 Apr 2009 22:40:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r770477 [2/2] - /incubator/stonehenge/trunk/stocktrader/Interoperability_Walkthru.mht Date: Thu, 30 Apr 2009 22:40:30 -0000 To: stonehenge-commits@incubator.apache.org From: drewbai@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090430224030.5DAFA2388B68@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: incubator/stonehenge/trunk/stocktrader/Interoperability_Walkthru.mht URL: http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/Interoperability_Walkthru.mht?rev=770477&view=auto ============================================================================== --- incubator/stonehenge/trunk/stocktrader/Interoperability_Walkthru.mht (added) +++ incubator/stonehenge/trunk/stocktrader/Interoperability_Walkthru.mht Thu Apr 30 22:40:29 2009 @@ -0,0 +1,4695 @@ +MIME-Version: 1.0 +Content-Type: multipart/related; boundary="----=_NextPart_01C9C9C0.D8288DD0" + +This document is a Single File Web Page, also known as a Web Archive file. If you are seeing this message, your browser or editor doesn't support Web Archive files. Please download a browser that supports Web Archive, such as Windows® Internet Explorer®. + +------=_NextPart_01C9C9C0.D8288DD0 +Content-Location: file:///C:/1EEBAEB5/StonehengeInteroperabilityWalkthru.htm +Content-Transfer-Encoding: quoted-printable +Content-Type: text/html; charset="us-ascii" + + + + + + + + + + + + + + + + + + + + +
+ +
+ +

Stonehenge Interoperability Walk-through

+ +
+ +

Apache License

+ +

Licensed to the Apache Software Foundation (ASF) under= + one +or more contributor license agreements.&nb= +sp; +See the NOTICE file distributed 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 t= +he +License.  You may obtain a cop= +y of +the License at: 

+ +

http://www.apache.org/licenses/LICENSE-2.0

+ +

Unless required by applicable law or agreed to in writ= +ing, +software distributed under the License is distributed on an "AS IS&quo= +t; +BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or impl= +ied. +See the License for the specific language governing permissions and limitat= +ions +under the License.

+ +

Overview

+ +

This document is meant to serve as a guide for explori= +ng the +interoperability of the Apache Stonehenge project.  This document will walk the develo= +per +through the process of configuring the different modules to consume business +services and order processing services on different frameworks.

+ +

This document assumes an environment based on a single +Windows 2008 Server running all the components of the Stonehenge project.  In a real world environment this a= +pplication +would most likely be distributed across multiple servers.  Throughout this document we will r= +efer +to the services using their localhost:{port number} addresses;  if your configuration is distribut= +ed +over several machines, or differs otherwise, please change the localhost +designation to the proper machine/host name.Prerequisites

+ +

In order to perform the tasks in this guide, you will = +need +to have the different components installed.  Please make sure that you complete= +d the +guides on the StoneHenge wiki.

+ +

.NET StockTrader Instal= +lation +Guide

+ +

·         +http://cwiki.apache.org/confluence/displ= +ay/STONEHENGE/Stonehenge+.NET+StockTrader+Installation+Guide

+ +

PHP and WSAS Stocktrader +Installation Guide

+ +

·         +http://cwiki.apache.org/confluen= +ce/display/STONEHENGE/Stonehenge+PHP+and+WSAS+Stocktrader+Installation+Guid= +e

+ +

Service Configuration Overview

+ +

.NET Configuration

+ +

The .NET Services are managed through the web and serv= +ice +configuration files.  In the r= +oot +directory of the StockTrader client website there is a web.config file.  In the appSettings section you wil= +l see +an ACCESS_MODE setting, the following table shows a list of available optio= +ns +for the ACCESS_MODE setting:

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+

ACCESS_MODE

+
+

Description

+
+

InProcess

+
+

Communicates directly with the database.  In this access mode no external + services are invoked.

+
+

DotNet_Http_WcfService

+
+

Communicates with the .NET Business WCF Service using BasicHttpBindi= +ng + at http://localhost:9000/TradeBusinessService

+
+

DotNet_WsHttp_WcfService

+
+

Communicates with the .NET Business WCF Service using + WsHttpBinding and Secure Messaging at + http://localhost:9000/TradeBusinessService/msec

+
+

PHP_Http_WebService

+
+

Communicates with the PHP Web Service using http at http://localhost= +:8080/php_stocktrader/business_service/business_svc.php +

+

WSAS_Http_WebService

+
+

Communicates with the WSAS Web Service using http at = +http://localhost:9763/services/TradeServiceWsas

+
+ +

 

+ +

After a buy/sell operation is sent to the Business Ser= +vice +it will be routed to the OrderProcessing Service.  The OrderProcessingService is conf= +igured +using the Trade.BusinessServiceConsole.exe.config file in the business_serv= +ice\bin\Debug +directory.  In the appSetting +section you will see a setting for ORDER_PROCESSING_MODE.  Below is a table that describes the +different options for the order processing mode.  With the exception of the InProcess +mode, the order is processed asynchronously, the call will return immediate= +ly +and the user will see the Closed Order Alert after visiting a subsequent pa= +ge.

+ +
+ +

Note: if you change the order processing mode= + you +will have to restart the console application for the changes to take effect= +.  This is not the case for the .NET +StockTrader website, any changes to the config will be reloaded on the next +page request.

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

ORDER_PROCESSING_MODE

+
+

Description

+
+

Sync_InProcess

+
+

Communicates directly with the database.  In this order processing mode the + business service will process the order synchronously and will return with + the order has processed

+
+

ASync_DotNet_Http

+
+

Communicates with the .NET Order Processing WCF Service using BasicH= +ttpBinding.  The default order processor addr= +ess + for this mode is http://localhost:8000/tradeorderprocessor

+
+

ASync_DotNet_Http_MSecurity

+
+

Communicates with the .NET Order Processing WCF Servi= +ce using + WsHttpBinding and Secure Messaging.  + The default order processor address for this mode is http://localh= +ost:8000/tradeorderprocessor/msec

+
+

ASync_PHP_Http

+
+

Communicates with the PHP Order Processing Service using http.  The default order processor addr= +ess + for this mode is http://localhost:8080/php_stocktrader/order_processor/or= +der_processor_svc.php

+
+

ASync_PHP_Http_MSecurity

+
+

Communicates with the PHP Order Processing Service us= +ing + WsHttp and Secure Messaging.  The + default order processor address for this mode is http://localhost:8080/ph= +p_stocktrader/order_processor/order_processor_svc_msec.php

+
+

ASync_WSAS_Http

+
+

Communicates with the WSAS Order Processing Service using http.  The default order processor addr= +ess + for this mode is http://localhost:9763/services/OrderProcessor= +

+
+

ASync_WSAS_Http_MSecurity

+
+

Communicates with the WSAS Order Processing Service u= +sing + WsHttp and Secure Messaging.  The + default order processor address for this mode is http://localhost:9763/se= +rvices/OrderProcessorMsec

+
+ +

 

+ +

PHP/WSAS Configuration

+ +

The PHP and WSAS Services are managed through the +StockTradeDB database.  After = +you +run the PHP database scripts you will have four new tables (DbConfig, +ClientToBs, BsToOps, and Service), which are used to configure the services= + for +PHP/WSAS.

+ +

Before you change the ClientToBs and BsToOps configura= +tion +open the Service tables and verify that the endpoint addresses are accurate= + for +your environment.  For this +walk-through you will need to have the following endpoints.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Service Name

+
+

Default Value

+
+

DOTNET_BS

+
+

http://localhost:9000/TradeBusinessService

+
+

DOTNET_OPS

+
+

http://localho= +st:8000/TradeOrderProcessor

+
+

DOTNET_OPSSEC

+
+

http://localhost:8000/TradeOrderProcessor/msec<= +/p> +

+

JAVA_BS

+
+

http://l= +ocalhost:9763/services/TradeServiceWsas

+
+

JAVA_OPS

+
+

http://localhost:9763/services/OrderProcessor

+
+

JAVA_OPSSEC

+
+

http:/= +/localhost:9763/services/OrderProcessorMsec

+
+

PHP_BS

+
+

http://localhost:8080/php_stocktrader/business_service/business_svc= +.php

+
+

PHP_OPS

+
+

http://localhost:8080/php_stocktrader/order_processor/order_p= +rocessor_svc.php

+
+

PHP_OPSSEC

+
+

http://localhost:8080/php_stocktrader/order_processor/or= +der_processor_svc_msec.php

+
+ +

 

+ +
+ +

Note: In the above service names BS stands for Business Service, OPS +stands for Order Processing Service, and OPSSEC stands for Order Processing +Service with Secure messaging.  +Throughout the remainder of this document the abbreviations BS and O= +PS +will refer to the Business Service and Order Processing Service +respectively.  OPS will be use= +d to +refer to OPS or OPSSEC depending on your configuration.

+ +
+ +

To configure the PHP Client

+ +

1.&n= +bsp;      +Open the ClientToBS table

+ +

2.&n= +bsp;      +Locate the PHP_CLIENT row

+ +

3.&n= +bsp;      +Change the BS value to the corresponding BS +service name from the table above.

+ +

 

+ +

To configure the PHP Business Service

+ +

1.&n= +bsp;      +Open the BsToOps Table

+ +

2.&n= +bsp;      +Locate the PHP_BS row

+ +

3.&n= +bsp;      +Change the OPS value to the corresponding OP= +S or +OPSSEC service name from above.

+ +

 

+ +

To configure the WSAS Business Service

+ +

1.&n= +bsp;      +Open the BsToOps Table

+ +