Wednesday, December 30, 2009

How to disable service listing in Axis2

Number of users have requested to have a way to enable/disable service listing in Axis2. What that means is, by default Axis2 list out all the service in the system when you go the following URL;


However there are situation where we do not need to expose our services publicly, in such a situation following would comes handy.

To enable/disable service listing use following parameter in axis2.xml (WEB-INF/con/axis2.xml).

<parameter name="disableServiceList">true</parameter>

True – Disable
False -Enable

Adding this does not prevent listing service under administration window, to stop it, you need to change the default username and password. You can do that by changing the following two paramters.

<parameter name="userName">admin</parameter>
<parameter name="password">axis2</parameter>

You can download the fix here, replace axis2-kernel.jar (WEB-INF/lib) with this.

Saturday, November 28, 2009

ApacheCon Asia 2009

ApacheCon is one of the main even ASF organizes each year, usually there are two main Apachecon, one in USA and on in EU. In 2006 we extend ApacheCon in to Asia and had the very first ApacheCon Asia in Colombo, Sri Lanka. And believe that was one of the very successful ApacheCon, even with security situation in country we were able to get a number of national and international speakers. Finally it was a great event....

After 3 years, Sri Lanka FOSS community organizing the second ApacheCon Asia both in Colombo, Sri Lanka and Beijing, China. I hope this time it will be much more better than 2006, unfortunately I am going to miss it....

Other than USA and few Europe countries, Sri Lanka has a large number of Apache Committers and Contributors (over 60 committers), so this would be a good chance for them to get together and meet other apache folks.

Friday, September 11, 2009

Google Open Source Blog: Tasty New Google Summer of Code Stats

Google Open Source Blog: Tasty New Google Summer of Code Stats

University of Moratuwa became the number one in Google Summer of Code

It is so nice to hear that University of Moratuwa has became the number one in the Google summer code for the second consecutive year. Congratulation !!!

I strongly believe Dr Sanjiva is the one who started this trend, and helped all of us to contribute to the world of open source and gain most benefits from it. And the small island (my Sri Lanak) has became the top contributor to the open source. Thank you for guiding us and helping us.

Thursday, August 20, 2009

Happy birthday Axis2 !!!

Five years ago, that is in 21 August 2004, we started Apache Axis2 project. Withing this small period Axis2 has become the most commonly used open source Web Service framework. And number of companies out there using Axis2 for their SOA applications. Withing this small period Axis2 has opened a number of opportunities, which includes new companies, various graduate opportunities and ect..

Why 21 st of August is important ? Well that is because that is the date we had the first face2face meeting on Axis2.

Let's look back some of the history of Axis2 project.

This is the First email that Srinath sent to the list announcing Axis2 F2F

These are the first set of people who come to the Axis2 F2F.

This is the summary mail of the first F2F

Initial developers of the project
Srinath, Ajith, Chinthaka, Chathura, Glen, Dims, Sanjiva and myself. And of course Jaliya and Dasarath also contributed a lot.

At the initial stage of Axis2 we used to have weekly chat, what special about those chat is we(initial developers) implement a prototype and discuss about that at the weekly chat. The funny thing is all most all the days, we have to throw that prototype and start a new one after the chat.
Here is the chat log of the first weekly chat.

From the day one of the project we used to follow the Apache guidelines, so we create patch and send them to the list. Then existing commiters can apply them, most of the time Alex and Dims used to apply those patches.

Here is the very first patch of the project.

When we start the project we did not have any commiter for Axis2 project, we had WS commiters. So following are the initial commiters of Axis2 project and here is the commiiter nomination email.

[VOTE][Axis2]Ajith, Deepal and Chinthaka for Axis2 Commiter

At the initial stage of the project we had so many milestone release before we hit 0.94 release. Here is the announcement email for first release of Axis2.
Axis2 first release – Axis2 M1

First few F2F
  • First F2F 21-24 August 2004, Colombo, Sri Lanka. And here is the first set of people who came to the event
  • Second F2F March 29-31st 2005 – Comobo, Sri Lanka
  • Third F2F and hackathon – December, 2005, San Diago, USA
  • Fourth F2F and hackathon - Indiana University, Bloomington

And here is my first email to Axis2 mailing list

My first mail to the list

Friday, August 07, 2009

Amazon EC2 and instances failures

I really like Amazon EC2 and I use that for different kind of experiments. Most of the time I use small, large and high cpu extra large instances. Most of the time my experiments run for about 10~15 hours, so far so good. I like Amazon I can easily scale out my experiments, I can easily increase the number of instances, if the instances is not enough to handle my application then I can move to different instance type etc...

However I am experiencing some issues, first issues is when I start about 10~15 instances most of them start quickly and few take a long time to start, because of that I have to wait (and pay additional $$ to amazon) to start my experiments. Even after I start my experiment, some times some of the instances become un-reachable, thats the killer. When that happen I have no option other than rebooting (or waiting a long time..) the instance(s) and restart the experiment. So my 15 hours experiment end up running for 25~30 hours. Issues is I have to pay $$ ...

I believe this is something Amazon has to address, EC2 idea is cool, but due to some network and infrastructure issues we can not use the EC2 as we expected.

Sometime this instance failure last only for few minutes and come back fine, sometime we really need to reboot or terminate the instances.

Friday, July 03, 2009

Who is master in Math and why?

One of my colleague explained me a very nice story he learned by reading the book called “Outliers”. According that book, it says Asian are some what smarter when it come to mathematics. And there is a nice story behind that too, that is the number system they used. For example in English we start with, one, two three.... , ten, eleven, twelve, thirteen, fourteen and etc... , if you think carefully. In English language though you pronounce as thirteen fourteen you write them differently. As en example when we call thirteen, it gave impression that the number is going to start with three, in fact it does not.

So, according the book this complexity make some issues in the childhood.

After listening to my friend I thought though this, then I found even in my own language (Sinhalese) we have some confusion. For example in Sinhalese when it come to 15 we pronounce is differently than other numbers, simply we break the sequence. From eleven to twenty we have a right sequence, the way we write and read is same except number 15.

Tuesday, June 09, 2009

How to fix MBR using Ubuntu live CD

When we have dual boot there are some possibility that we might delete one of the partition, and causing deleting MBR as well. Issues can be easily fix using Windows CD, however you need to remember the password, if not ..

Ubuntu Live CD comes handy this case, just follow the following steps, you will be back in business.

  • Boot from Ubuntu Live CD
  • Then you need to download the ms-sys, you can find that from -
  • Once downloaded it will ask for auto install, click that
  • Next type “sudo fdisk -l” , from that you can find the main partition you want to fix
  • Then type “sudo ms-sys -m /dev/sda”
  • Next restart, everything should work fine.

Axis2 1.5 released

Axis2 1.5 released and available to download, this is a major release and has a number of changes

  • Removed the JDK 1.4 compatibility, now Axis2 works JDK 1.5 and above
  • Moving transport to a separate package
  • A number of bug fixes and
  • Many more new small scale improvements

You can download the release from

Thank you for using Axis2.

Sunday, June 07, 2009

Axis2 tutorials and articles

I have written a number of articles on Axis2, and those covers various topics on Axis2. However sometimes it is hard to find what you want, so I compiled a list of articles and categorized them in somewhat organized manner. I believe that will help to find the document you want with minimum time. And I will keep on updating this list, so that you can find all Axis2 articles in one place.

Axis2 Architecture
Axis2 Deployment
Axis2 Services
Axis2 MessageReceivers
Axis2 Handlers
Axis2 Transport
Axis2 Session
Axis2 Client
Axis2 Configurations
Axis2 General
Apache Axiom
Quickstart Apache Axis2

Wednesday, June 03, 2009

Power of Code generation

Code generation is so powerful technology, and it is been used for various purposes and various places, and code generation is not a new concept as well. In the past even though people have not used the same name they have used the same concepts. Normally any given code generation tool there are four parts, and number of steps and component may very from one component to other
  • Code generation configurations
  • Transformation
  • Transformation configuration
  • Code generation
Configuration can be a property file, XML file or datafile or any other kind of document, and most of the time configuration can be human readable. Next is the transformation, for the transformation it could either be something like XSL or simple logic in the scripts of class file to do the transformation. Finally creating artifacts as the results.

A classic example of code generation can be seen in the Web Service field, there people use code generation to generate service and client code from a WSDL. In that case the configuration file would WSDL, and the transformation would be WSDL to Java, and transformation option would be, web service framework, language and etc..., and finally the output would the either or both service skeleton and the stub.

One other powerful use case of code generation is testing, specially in the process of staging testing, where we have some SLA to meet. We generate the code (scripts and configurations) and then measure the results, if it does not meet the expectation then we change the code generation configuration and re-generate the code and measure the results. We do this process until we get the expected results, doing this kind of process manually is so hard as well as error prone.

The most difficult part of the code generation is to identify the requirements including the input configuration and output format. Once we have that code generation is easy, and once we have the code generation tool, doing testing is so easy.

Most of the time what people do is do the experiments(testing) manually in a very small scale, and then use those code and configuration to build a code generation tool.

Sunday, April 26, 2009

Scam from yahoo messenger

I have been using Yahoo messenger more than 9 years, but did not have bad experience with that. However now I am starting to get a number of scam from Yahoo messenger. One thing I noticed is that all the scam I got when the person who is sending is off-line. So I do not know whether I am also sending those kind of message, if I have done : Please forgive me . I do not receive those scam from all the people in my contact list, but from only few. One of the common message I get

“Wow I finally found a way to lose weight and is inexpensive ...”

I think yahoo should take some action to stop this kind of scam, if the current security mechanisms are not enough to stop those scams, then they need to find an alternative to stop. The main reason is Yahoo is one of the most commonly use IM.

Monday, March 30, 2009

Xen: finishing the job

Once upon a time, Xen was the hot virtualization story. The Xen developers had a working solution for Linux - using free software - well ahead of anybody else, and Xen looked like the future of virtualization on Linux. Much venture capital chased after that story, and distributors raced to be the first to offer Xen-based virtualization. But, along the way, Xen seemed to get lost. The XenSource developers often showed little interest in getting their code into the mainline, and attempts by others to get that job done ran into no end of obstacles. So Xen stayed out of the mainline for years; the first public Xen release happened in 2003, but the core Xen code was only merged for 2.6.23 in October, 2007.

A nice article by Jonathan Corbet, which compare Xen and KVM. (worth reading)

Thursday, March 26, 2009

Apache Software Foundation is 10 years old

Apache Software Foundation celebrated its 10 year anniversary at ApacheCon EU. According to my knowledge ASF is one of the best open source foundation in the world. And it has a number of different projects. I am so happy to be a part of ASF and I am contributing to apache since 2004, so it is almost 5 years now. ASF has creatde a web page including most of the highlights of the last 10 years, I think it is worh reading.

Wednesday, March 25, 2009

Amazon EC2 – Building Apache Web Server

In my previous post I explained how to do ssh and scp among EC2 instances, now I am going to discuss how to install Apache on EC2 (Fedora8). I know building Apache is not such a difficult work if you have setup the environment with all the essential libraries. However if it is not then it is some what difficult, in this post I am going to explain some of the challenges you may encounter if you try to build Apache on Fedora 8 (on EC2). You might imagine what is the difference between normal Fedora and Fedora for EC2, the main difference is EC2 runs on Xen hypervisor, so what you have is para-virtualization (you modify the OS to run on Xen).

First step is to install all the required libraries. So you need to install gcc and g++,
Installing gcc : yum install gcc
Installing xmms : yum install xmms
Installing g++ : yum install gcc-c++

In my case doing all those did not allow me to build the Apache, it was giving me an error saying “asm/page.h” does not found. Then I realize some of the OS related header files are missing in the OS image. To solve that I had to copy “/usr/include/asm” from a normal Fedora OS. After I did all those, boom Apache worked fine.

Just follow the same procedure if you want to setup your own dedicated servers.

Sunday, March 22, 2009

Amazon EC2 – Communicating amoung instances

These days I am doing some cool work with Amazon EC2, so there were a lot to learn and a lot to find out. One of the major challenge I faced was to communicating between instances. For my application I need to do “ssh” and “scp” among the nodes, and most of those taking place automatically. So I had hard time figuring out this, the main reason is in EC2 if you want to connect to an instance you have to give your key-pair. Which is not possible for my application. So what I did was following.
  • Run an instance with the your operating system (in my case I choose Fedora 8), when you run select the key-pair and security group.
  • Next you need to generate SSH key, you can do that using following command (Do not enter a passphrase)
  • ssh-keygen -t rsa
  • Now you need to go and edit the ~/.ssh/authorized_keys , For that copy the content of .ssh/ and paste
  • Now open the ~/.ssh/authorized_keys, and change the tail to be “root@domU” , basically you need to remove root@ec2-.. with new one
  • Then you need to edit the “~/.ssh/know_hosts” file and add the following,
  • * ssh-rsa Asasdas....
  • (Asasdas.... = content of

Now you are all set (unless you need to install some other packages), next step is to bundle your image and register that with EC2 and S3. Then try running more than one instances, now if you try to do ssh among those you will find that you do not need to type the password, or you do not need to specify the key-pairs.

Wednesday, March 11, 2009

AWS Management Console

If you are using Amazon EC2, then you would find the new AWS Management Console as a very useful tool. I agree you can have the same functionality using normal SOAP API but this is cool. As I see so far it is just read only data, but provide a handy way to look at the instances you have, AMIs you have created, various secuirty gropus, kep-pairs and etc.., I think it should provide additional methods such as,
- terminating an instance
- Deleting an AMI
- And may be remove data from S3

Then you can do most of the work without worring about the command line tools.

Sunday, February 22, 2009

Cloud Computing infrastructure using Axis2

Utility computing or the cloud computing is becoming the next generating computing platform, which reduces the time and cost. So when we want the resource we go and rent depending on the time we want and depending on the money we have. According to my understanding Amazon EC2 plays a big role in Cloud computing, and of course they use Web Services for almost everything.

Apart from commercial cloud infrastructure, there is on good open source cloud infrastructure as well, which is called EUCALYPTUS (a research project). I knew about this for a few months, but I did not know that they use Axis2 as the Web Service framework until today (Thanks Deep for letting me know that). One of the cool thing about EUCALYPTUS is that is functionally equal to Amazon EC2. So if you want to do the testing on your system before you move into Amazon EC2, then I think this is a good way of doing that.

Monday, February 16, 2009

Writing an Axis2 module

One of the interesting feature of Axis2 is its nature of extensibility, there are a number of way to extend Axis2 functionality. Here I am going to discuss how to extend its core functionality, that is invoking customer code when a message is received to the system. All the WS* features (Reliability, Security etc..), implemented in this way. Here I am going to discuss how to write a very simple Axis2 module to count the number of incoming messages and outgoing messages.

For this module we need three main components,
- Incoming message handler
- Outgoing message handler
- Module configuration

Incoming message counter has a global counter, which will be incremented for each request, and the same way outgoing message counter also has a global counter which also incremented for each outgoing messages. Then finally Module configuration which specify the ordering of handler in the execution chain [Axis2 execution chain].

you can find the source code of all those components as well as executable module.

How to use the module?
To use the module, first you need to download the "counter-module.mar" and need to drop into "modules" directory in Axis2 [Axis2 deployment]. Then you need to engage the module, for that you can either
- Do that using axis2.xml <module ref="counter-module"/>
- Or you can do that using Axis2 management console
(login to the admin console, then go to the engage module menu bar at the left hand side).

How to see that working?
To see that working you can do any of the Axis2 service invocation [Axis2 client API], the simplest way is to invoke the version service. For that type the following in the browser.

Then if you look at the server console (Tomcat console), you can see our module prints request and response count. If you invoke the service again you will see the number is getting incremented.

- Source code
- Binary file

Friday, February 06, 2009

What is WSO2 and WSO2 Carbon

Reacently WSO2 relaased its company overview or the elivator pitch, check it out. What it is, who they are, what they do ....

One of my SOA teacher, Paul Fremantle (CTO, WSO2) has written a nice blog about WSO2 Carbon as well as his thought on SOA composition. I think that blog is very useful to get an understanding about what is going to happen in the future of SOA, how the component oriented architecture going to be used in SOA.

Monday, February 02, 2009

C is so powerful but not nice as Java

I am doing Java programming more than 6 years now, and I think I had a chance to most of the J2SE components. And specially from Axis2 I learn a lot about Java. I always found Java is so nice, due to various reason, first it is easy to program, second it has number of tools support. If you have some problem, there is a high probability that someone has already found and written code for that, so that make your job so easier. Another most important factor is debugging support for Java, it is so easy to debug Java programs, including remote debugging. Additionally most of the IDEs written for Java has better support for debugging.

Anyway recently I got a chance to work on some of the cool C stuff, I remember I have done some C program for my undergraduate. There I did not do much work other than implementing some of the data structures and few sorting algorithms. So I believe my knowledge on C so little compared to Java. So the recent work involved a lot of low level C, concurrency, load balancing. I think that is a cool experience someone should have with C.

While doing so I faced some strange problem sometime took days figure out the issues, one of the main reason was my lack of knowledge on C program debugging. I tried to use “gdb” but that did not work for most of the cases. Other problem I faced was getting negative time, basically I got the time before starting my execution and got the time again after execution, and when I deduct end-start I got negative values. I found that a known problem and I even tried some of the workarounds sometimes. Anyway finally I got everything working fine, now I think now I am comfortable of reading any kind of C program at least understand that correctly, and may be modify that.

Tuesday, January 27, 2009

Essential Java resources

This is very useful article, it has most of the resources you may need that if you are java developer. Which has collection of resources for Web sites and developer Web portals, Weblogs, Packages and/or libraries, Conferences and books.

Read the full article here.

Sunday, January 18, 2009

Axis2 1.5 is coming stay tuned

After about six month we are working towards getting Axis2 1.5 release. Glen has done two beta releases so far, so download the beta releases and see whether the issues you want to fix are fixed there. Then if it is doable team may consider that.

You can download the release from - here

If you see a problem create a JIRA

Friday, January 09, 2009

Component Oriented Architecture and WSO2 Carbon

Computer industry is changing so rapidly and technology coming and going very fast, some are stay in the industry some longer duration and some are not. So anyway by looking at the technology movements I think next generation of computer would be component oriented. Where in the first place we had very tightly coupled computing with zero extensibility and zero flexibility. Then they moved to loosely coupled systems. A classic example of that is Service oriented architecture or SOA.

There the idea is everything in the system is services, so the communication between service happen using message passing. So system become so flexible and extensible. And there are few ways of implementing SOA too;
  • Using existing messaging system
  • POX- Plain Ole XML
  • Web services

And I think Web services became very success in the SOA, and it has become a industry stranded for SOA. So many specification, so many implementation. Above all due to standards and standards bodies like WSI, most of the implementations are said to be inter operate. For example Microsoft .Net and Apache Axis2 inter operate each others.

Moving beyond the service oriented architecture, now people are developing system using building blocks called components. With the introduction of OSGi it has become a very popular topic. When I heard about OSGi I did not realized the power of OSGi and specially components based systems. But now I know the power. Even Axis2 can be used as an OSGi bundle (or component).

By adopting to the new technology WSO2 has also moved most of its projects to OSGi based components, as a result of that they can build different kind of system integrating different building blocks of OSGi bundles. By looking at the activities going on, I would say WSO2 Carbon is becoming one of the coolest project or rather framework for building SOA related technologies, such as Web Services, ESB, Registry etc, ..

Fun with Google Maps

We all know Google Maps is very powerful and useful tool, in the meantime no magic it is a software, and idea of this post is not to tell anything bad about Google Maps. Today I wanted to get directions to some place, after completing that just for fun I searched direction from Mountain View, LA, USA to Japan interestingly Google was able to give me the driving direction from MV to Japan, we know it is not possible to drive from USA to Japan, however due to some incorrect logic (bug) it gave me the directions :) . I know how hard to test all the use cases, so it is ok to have this kind of bugs in a software, it is tradeoff between usage and the perfrormance (being a software guy I know how hard to test all the edge cases). I know what I did was a crazy (who is going to drive from USA to Japan) thing too, ... but it was fun. Want to look at full directions ? see here

Monday, January 05, 2009

Autonomic Computing

While I was reading about cloud computing I encounter the term “Autonomic computing”, then I found that it has a direct relationship with the cloud computing. First let's look at what it mean by Autonomic computing. Autonomic computing refers to the self-managing characteristics of distributed computing resources, adapting to unpredictable changes whilst hiding intrinsic complexity to operators and users. As name implies an autonomic system makes decisions on its own, using high-level policies such as service level agreement; it will constantly check and optimize its status and automatically adapt itself to changing conditions.

Nice thing here is that though it said to be self manage it does not have any Artificial Intelligent (AI) involve with it, it is just control theory. Having said that Autonomic computing can be modeled in terms of two main control loops (local and global) with sensors (for self-monitoring), effectors (for self-adjustment), knowledge and planer/adapter for exploiting policies based on self- and environment awareness.

Typical Autonomic Computing system will contains following characteristics,
  • Self-Configuration: Automatic configuration of components;
  • Self-Healing: Automatic discovery, and correction of faults;
  • Self-Optimization: Automatic monitoring and control of resources to ensure the optimal functioning with respect to the defined requirements;
  • Self-Protection: Proactive identification and protection from arbitrary attacks.