Monday, September 29, 2008

The crowd within

A battle of ideas is going on inside your mind

THAT problem solving becomes easier when more minds are put to the task is no more than common sense. But the phenomenon goes further than that. Ask two people to answer a question like “how many windows are there on a London double-decker bus” and average their answers. Their combined guesses will usually be more accurate than if just one person had been asked. Ask a crowd, rather than a pair, and the average is often very close to the truth. The phenomenon was called “the wisdom of crowds” by James Surowiecki, a columnist for the New Yorker who wrote a book about it. Now a pair of psychologists have found an intriguing corollary. They have discovered that two guesses made by the same person at different times are also better than one.

Do you want to read the full story ?

I hope you may start to read the book as well.

Wednesday, September 24, 2008

Configuring Axis2 via axis2.xml

As you have already realized there are a number of parameters in Axis2. You can easily change them as you wish, but the problem you might have is the meaning of those parameters. So I recently wrote an article explaining most commonly used parameters in Axis2.

Read it
and tell me , if I have missed any of the parameters.

Monday, September 22, 2008

Bad side of social networks

I do not think any one of us new to the term social networks , how many social networks out there ? . And I am sure you belong to at least one of them. When I say social networks there are different kind of networks. Some of them are profession networks such as LinkedIn , and some of them are network for fun (facebook) , some of them to share images (flicker). Not only that number of social networks are going up very rapidly.

If we look at those social networks , different network gather different data from us. If we look at the professional networks they will collect data like places where you have worked , type of the work you have done. On the other hand if you look at fun type of networks , it collects data like what do you like to do at the leisure time , what places you would like to visit and etc... , at the end of the day all those networks collect so much of personal data from you. With knowing or not knowing , we let those applications to collect and share our data. I agree that I am also a member of a number of networks.

Now let's see what are the problem associate with having those personal data for public usage.

First thing is you start to receive a number of unwanted or what we call as junk mail , because someone can find your name and email from those networks and then find the areas your are interested in and then send emails. And we all know what happen when your email address goes public.

Second , from those social networks one can find your friends. And then someone can send emails or photo links as your friends sending to you [A good example is tagging and commenting in facebook]. When you see a mail from your friend saying look at this nice picture , you are most likely to click that link. Then it might take you to bad site and ask your to login to the applications which is similar to the that of your social network home page. Then they can collect your user name and password. This is very risky because most of the people use same user name and password for various places.

Third , say you have a friend call “Foo” in facebook , then that person is not there in your professional network. Now what happen is someone (not Foo) can send an invitation asking adding you as a friend in your professional networks. Since the name is familiar to you , without checking too much you will allow to add that person to your network. Once you allow , he can send request to some other friend of you , then that person will also allow , because he is already a friend of yours. This is often happen in entertaining network like facebook.

I am sure there are enough information out there in various social networks , where someone can collect those information and do online transactions or login into your bank accounts. In my view I think social network help a lot for phishing attacks as well.

One thing to remember is yes , social networks are good and fun as well as help a lot. But there is bad site of that, we need to know what kind of data we allow to share. Specially , when you provide your personal information like birthday , address , phone numbers think twice and provide.

Thursday, September 18, 2008

Exposing data bases as a Web service

I know Data service is one of the hot area in the Web services world, data service is nothing but enabling Web services support for the relational data bases. There are a number of ways of doing that. However Axis2 and WSO2 has a built a very cool and easy way of doing that. Which is called WSO2 Data services. I think I have mentioned the architecture of Data services in few months back. Today I am not going to talk about that , rather I am going to lists some of the very cool feature in WSO2 data services 1.0 release.

You can download that , which is free and release under Apache 2.0 license. So if you do not like how that work you can change that , I am sure you do not want to do that. Because you will be more than happy with the set of features that has :)

* Service enable data locked in relational databases, CSV and
Microsoft Excel files
* Zero code approach - simple XML descriptor file is all you need
* Easy configuration via web based graphical console / Eclipse
plugin wizard
* Customizable XML output
* Both REST & WS-* support
* Built-in Connection pooling support
* Aggregate data from multiple data sources
* Support for exposing Stored procedures & functions
* Built-in caching to enhace performance
* Throttling to ensure that your database is never overloaded
* Try-it tool to test the services on the fly
* Secured access to data
* Reliable delivery of messages

WSO2 Web Services Framework for Jython using Axis2

Adding one more scripting support to Axis2 WSO2 has announced Jython support to Axis2. So now you can deploy and access Web services using Jython. It is very cool idea. Luckily I got a chance to involve this a lot with Heshan (a student from , University of Colombo) , who did the implementation work. Actually this is my second chance to get involve with scripting support for Axis2 , first one was JRuby support which was done by Thilina (Student from University of Moratuwa.)

WSO2 WSF/Jython provides an amazingly simple approach to create (Code First) and consume Web Services in Jython. This framework integrates the Apache Axis2 web services engine into Jython. Thus, providing all the power and versatility of the
Axis2 engine to the Jython user. Now, with just a few lines of code, Jython users can enjoy the benefits of Service Oriented Architecture using Web Services in their applications.

Web Service clients written using WSF/Jython framework could invoke enterprise web services which require WS-Security. Sending binary attachments as MTOM is also supported.

WSO2 WSF/Jython is released under the Apache License v2.0.

There are two packages that comes with this release, the server side and the client side.

For more information, please visit our project home page,

You can download this release from:

Client Side Features (Explained in detail here)

* Support for invoking Web Services in a simple clean manner

* Ability to use WS-Addressing when invoking services

* Ability to invoke services which require WS-Security

* Ability to send binary attachments using MTOM

Server side Features (Explained in detail here)

* Support for exposing services written in Jython

* DataBinding support using a simple annotation mechanism

* Automated WSDL generation

* Ability to expose all enterprise features of Axis2 to services written in Jython

Wednesday, September 17, 2008

Axis2 transports as a new project

When we start Axis2 , Axiom was part of Axis2. And then we realized that the advantage of moving Axiom into a separate project , so we moved Axiom into Ws-Common. After that a number of project started to use that. As you know Axis2 core is transport independent as well as Axis2 has number of transports support. At the moment projects like Apache Synapse are using Axis2 transport. And they do not need full Axis2 to have Axis2 transport support. So moving transport into a separate project will be benefited for many people. So last week I was able to move all the transports from Axis2 to new module in WS-Commons. And Dims helped me to setup nightly builds for the transport module.

So now if anyone interested in writing transports for Axis2 , or if you have already written any transport its time to add them to transport project.

Monday, September 15, 2008

XML tool to manage XML documents through a Fluent Interface

"XMLTool is a very simple Java library to be able to do all sorts of common operations with an XML document. As a Java developer, I often end up writing the always the same code for processing XML, transforming, ... So i decided to put all in a very easy to use class using the Fluent Interface pattern to facilitate XML manipulations."

It seems to me that the API is very simple and easy , if we can get somewhat similar API for Apache Axiom that would be great!

Friday, September 12, 2008

WSO2 Web Services Framework for PHP 2.0 Released

WSO2 Web Services Framework for PHP (WSO2 WSF/PHP), is an open source,enterprise grade, PHP extension for providing and consuming Web Services in PHP.WSO2 WSF/PHP is a complete solution for building and deploying Web services and is the only PHP extension with the widest range of WS-* specification implementations. It's Key features include, secure services and clients with WS-Security support, binary attachments with MTOM, automatic WSDL generation (code first model), WSDL mode for both services and clients (contract first model) and interoperability with .NET and J2EE.

You can download the release from:

Project home page:

Key Features

1. Client API to consume Web services
* WSMessage class to handle message level options
* WSClient class with both one way and two way service invocation
* Option of using functions in place of object oriented API with

2. Service API to provide Web services
* WSMessage class to handle message level options
* WSService class with support for both one way and two way operations
* Option of using functions in place of object oriented API with

3. Attachments with MTOM
* Binary optimized
* Non-optimized (Base64 binary)

4. WS-Addressing
* Version 1.0
* Submission

5. WS-Security
* UsernameToken and Timestamp
* Encryption
* Signing
* WS-SecurityPolicy based configuration
* WS-Secure Conversation

6. WS-Reliable Messaging
* Single channel one way and two way reliable messaging

7. WSDL Generation for Server Side
* WSDL generation based on annotations and function signatures, and
serving on ?wsdl or ?wsdl2 requests

8. WSDL mode support for both client and server side
* Write services and client based on a given WSDL
* WS-Addressing and WS-SecurityPolicy is supported in WSDL mode
* MTOM is now supported with WSDL mode

9. REST Support
* Expose a single service script both as SOAP and REST service

10. Provide easy to use classes for common services
* Consume some well known services such as Yahoo search and Flickr
and Amazon services using predefined classes

11. wsdl2php.php script. This script can generate PHP classes for services
and clients for a given WSDL to be used with WSDL Mode .

12. Data Services API
PHP Data Services API that enables exposing database queries as web

Major Changes Since Last Release
* Added PKCS12 Keystore Support
* Added Secure Conversation Support
* Added Replay Detection Support
* Contract First Web Services support for MTOM
* SWA ( Soap With Attachments ) Support added
* MTOM Attachment caching support added
* HTTP Chunking support added
* REST API Improved to support HTTP verbs GET,DELETE,PUT and POST
* New PHP Data Services Solution
* WS-RM 1.1 added
* Many Bug Fixes

Reporting Problems
Issues can be reported using the public JIRA available at:

Monday, September 08, 2008

The Evolution of a Programmer

I recently encounter this interesting entry.

High School/Jr.High

20 END

First year in Collegeprogram Hello(input, output)

writeln('Hello World')

Senior year in College
  (defun hello
(cons 'Hello (list 'World))))

Read the full story here

Tuesday, September 02, 2008

Downloading Google Chrome from Mozilla FireFox

Yesterday I heard the news about Google Chrome and then I wrote a blog about that. Today I download the Googles's latest application , which is Google Chrome using FireFox. So is is fun , when I want to switch to FireFox what I did was download FireFox from IE and then switch to that. Today I did the same thing , I download the Google Chrome and publish this blog using that.

First impression is very good and I can even see that perform very well , congratulation thank you very much to Google team for doing such a great thing.

Monday, September 01, 2008

Google plans to launch Web browser

Google is always doing cool thing and other thing is that whenever google does something good most of the people started to use that. a good example for those are
- YouTube
- Gamil
- Google groups
- Google maps
- Google Spread sheet

So today I got to know that Google is planing to introduce a new browser [Full Story] . I think that would be a cool idea , however the problem is will it be able to compete with FireFox. But I believe that Google can do that . Let's wait and see , anyway if google release a new browser then I will also download and try that.

I almost forgot to add the most interesting part , have a look at introduction to it using a comic strip.

Web Service Discovery using Search engines

Few days back Kaushalye and I had a chat about features of WSO2 registry as well as supported standards. One of the reason behind the discussion was that he is doing a research on UDDI and nowadays registry like WSO2 registry. One of the issues with nowadays registry is that they do not follow an open standards , so that causes to number of issues when it come to federation and interoperability. If we just think about something like UDDI registry they are inteoperable and follow a common standards. Yes , I agree UDDI is somew hat complex and because of that not many people use UDDI in there applications. That is one of the main reason behind WSO2 registry , Mule Galaxy etc..

On the other hand if we take WSO2 registry for example , though it does not follow any particular standard for a SOA registry , which provides a way to interact with others. Which is ATOM or APP, anyone can build an application to interact with multiple WSO2 registries. So we can solve the problem of federation issues using APP. However that only among a set of WSO2 registry instances , then the problem is how can we federate and service discovery among registries from different vendors.

Let's forget about all those and focus on what I need to discuss here. The idea behind SOA registry is to

  • Register SOA artifacts like Web services
  • Mange artifacts
  • Discover them
  • Invoke them

If you look at UDDI registry , that exactly what it does.

When I read some of the articles and papers in the internet (Thank Kaushalye for the links) , I found most of the commonly used search engine (Google , Yahoo etc) can be used to Web service discovery. Those search engines knows how to talk to UDDI registries and get the data from there. I too agree that it is good if we can use search engines for Web service discovery purposes ,rather than building new applications for that .

If we look at most of the registries , they are isolated, meaning no connection with each other. So applications like Google can not find them. Then it is very difficult to do the service discovery. Therefore it is always good idea to have something like central registry. Then search engines can communicate with them and do the Web service discovery.

Therefore I think it is good if we can come up with open standard for SOA registry (of cource which should be which is much simpler than UDDI ) . And then build Crawler to talk to those registries and do the service discovery.