Engwar

Chintana Wilamuna's weblog

Using WSAS business service with .Net trader client

without comments

Stonehenge is an Apache project started to demonstrate interoperability between different Web services platforms. Until we get this into the Stonehenge documentation, this is to record how to configure .Net trader client (a web interface written in .Net and is operating in the presentation layer) to talk to business service written using Java and is hosted in WSAS. Prerequisites and installation steps can be found in the Stonehenge wiki.

IMO (also I’ve raised this issue numerous times in the Stonehenge mailing list) problem with .Net WCF code we have now in Stonehenge defines bindings to each and every endpoint. Currently Stonehenge .Net trader client program can talk to business services implemented in .Net, Java (deployed in WSO2 WSAS and Sun Metro) and PHP (implemented using WSF/PHP). Each of these implementations runs on a different port and is having their own URL that they’re exposing the services. When there is a new implementation of the business service using a different framework, in order to point the .Net trader client program to talk to this new business service we have to add a binding into the trader client configuration with a binding specific to that. This, IMHO, defeats the whole purpose of Web services. When you compare .Net WCF to WSO2 Web services frameworks, in the WSO2 family of open source frameworks for many languages, only need the end point. When you want to talk to a different service with similar semantics, you just change the end point URL and everything else just work. There’s no “boilerplate” configuration necessary. That’s loose coupling. Anyhoo, back to the steps,

  1. Open SQL Management Studio
  2. Connect to your StockTraderDB database
  3. Open up ClientToBs table and make sure DOTNET_CLIENT is using DOTNET_BS
  4. Open up Service table and change the URL of DOTNET_BS to http://localhost:9763/services/TradeServiceWsas
  5. Open Web.config in \dotnet\trader_client\Trade and add requireSignatureConfirmation="false" to line 99. After the change the line should look like the following,

    messageSecurityVersion="WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10" requireSignatureConfirmation="false">

  6. Build WSAS trunk
  7. Start WSAS by running <WSAS dir>\bin\wso2server.bat
  8. Import BS.jks and OPS.jks in <stonehenge trunk>\stocktrader\wsas\resources\conf. Go to https://localhost:9443/carbon and login as admin. Username: admin, password: admin.
  9. Click on Key Stores -> Add New Key Store. For BS.jks password is ‘yyy’. For OPS.jks password is ‘password’.
  10. Start .Net services by running RunServices.bat
  11. Login to .Net trader client by going to http://localhost/trade and tryout the operations

Written by Chintana

February 11th, 2010 at 11:59 am

Posted in .net, apache, stonehenge, wcf

Yahoo Traffic Server

without comments

Cleaning our every breath

Yahoo has donated the caching proxy server they use internally to Apache Foundation. This, apart from acting as a high performance proxy server has many other cool features. If you’re trying it out here’s the minimum required settings that you should set in order it to act as a caching proxy server.

First you have to compile it from svn, or git. Info on doing this is available in the README file. After doing make install, by default it’ll be installed into /usr/local. Configuration directives are broken down into a series of files in order to make it easy to find and change aspects of the system. Main configuration file reside in /usr/local/etc/trafficserver/records.config. Open it up with a text editor and make sure that proxy.config.reverse_proxy.enabled and proxy.config.url_remap.remap_required are set to 0. Then open up /usr/local/etc/trafficserver/storage.config and configure a simple file cache. Uncomment the respective entries and make sure a folder with the name exists that the traffic server user can write to.

Start the traffic server by trafficserver start. Configure your browser to use <ip of the machine running traffic server>:8080 and you’re all set. Now you can test with the bazillion other options available in the config files.

Written by Chintana

February 5th, 2010 at 11:27 am

Posted in trafficserver, yahoo

Web site lead generation pages

with one comment

This article explains some worthy insights into making lead generation pages. An interesting idea that’s new to me was to make the page a dead-end. Having no links on the lead generation page that links back to the main site. Making it “harder” for the user to click something and navigate away from the lead gen page. Hmm … Also the article has some intriguing example designs of lead generating pages.

Written by Chintana

February 2nd, 2010 at 5:05 pm

Posted in lead generation