Axis2 and Eclipse Plugin

on Wednesday, July 22, 2009

Axis2 is a marvelous tool for developing Web Services. It introduces good integration with Eclipse and a clean deployment model. Let me summarizes my study on this tool after a few days of hands-on with it.

What is my expectation to myself?

  • I am able to develop both top-down and bottom-up approach in a robust way.
  • I am able to develop both WSDL1.0, WSDL2.0
  • I am able to develop RESTful Web services.
  • I am able to develop Sync, Async, RESTful client.


My experiences in Axis2:

  • Eclipse is a wonderful IDE to work with but to fully utilize the Axis2 features. PLEASE DO NOT RELY ON Eclipse. It is quite disappointing.
  • Eclipse introduces rapid application development for web services and it transparents all the WSDL2JAVA, JAVA2WSDL command prompts for you. You can simply focus on your business logic if you are working on a simple web services project.
  • Customize the WSDL is very simple. Simply drop your own written WSDL into the META-INF folder and change the services.xml to force to use your own WSDL.

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

  • You can write your own MessageReceiver and manipulate the way to parse a SOAP Message. It will be quite challenging and it is most likely needed if you are trying to deploy a very complicated web service.
  • Axis2 has some minor bug in handling the fault message. (Under the wsdl:binding, we should use wsdl:fault not wsdl:outfault)
  • For handling of fault, you can write your custom exception which extends from AxisFault and manipulate from there. However, I personally feel that we should always return to the SOAP client no matter is error or correct return.


My best practice in developing web services:
  • Hybrid of top-down and bottom up approach is more practical due to the fact that not many developers understand WSDL and coding WSDL is very tedious.
  • For bottom up approach, you will have more maintainability. This is because the code generated is not easy to understand and of course not easy to debug.



Methodology in developing web services using eclipse + Axis2 1.5
  1. Download axis2 1.5 and the war distribution.
  2. In eclipse, set the Axis2 runtime.
  3. Create a dynamic web application and link it to Tomcat 5 server.
  4. Create your service class.
  5. Create the web services using bottom-up approach in eclipse.
  6. Eclipse will automatically setup all the folder structure for you.
  7. Note that the jars is not the complete one. The complete one is in the war distribution.
  8. Replace the jars accordingly.
  9. Build the project and export as WAR to run.

Lousy Working Attitude

on Tuesday, June 30, 2009

It's been a hard time today.

I think it is important to have good working attitude. In the IT industry, we are here to solve problems. However, today I meet a colleague which is pushing the problem.

If this is the technical level you have, sorry. You are quite noobie.

TOAD is a good tool

on Monday, June 15, 2009

Today I meet some freaking problem in tablespaces. I have been using PL/SQL in running SQL, tweaking data. It is my best friend for playing around with Oracle.

I personally found that PL/SQL is fast in retrieving, writing package, sorting data, coding, debugging. I always think that this tool is good enough for me in WRT.

But I was wrong. Thanks to Ligek who pointed out the benefits of TOAD. I manage to solve the tablespaces problem with some clicks using TOAD.

TOAD is good in generating scripts, DBA configuration, and a lot more I need some time to dig into them.

Let me find a day to play around with it.

Demoralizing mood in company

on Monday, June 8, 2009

It is another boring day in company. As usual, I need to focus on fixing bugs and reviewing emails, resolving red tapes. It's enough. It is time to look around.

In fact, solving bug is not an easy task also. I have been facing a random bug for 3 days and till now there is no resolution yet. I fed up because of the lousy written code. The classes introduce circular linkage which is really damn stupid.

This angry mood led me to the sad event which happened last week where 8 people were retrenched immediately then without prior notice. Scary sia~~~~

It is time to look around.

Oracle - Dealing with Dates

on Wednesday, February 13, 2008

When using Oracle, it is very normal to deal with date, date conversion, date manipulation. Below is a quick guide on how to use them properly.


  • trunc key words - trunc keywords is useful to eliminate the time field of the datetime column. You format the time field to a specific format you want also. For example, trunc(date_column); trunc()


Below is the table that shows the format parameters:



















































Unit Valid format parameters
Year SYYYY, YYYY, YEAR, SYEAR, YYY, YY, Y
ISO Year IYYY, IY, I
Quarter Q
Month MONTH, MON, MM, RM
Week WW
IW IW
W W
Day DDD, DD, J
Start day of the week DAY, DY, D
Hour HH, HH12, HH24
Minute MI

Tomcat Cookbook

This post will log all the necessary content for playing with Tomcat AppServer:


  1. Where to locate System.out.println logs?

    Ans: In Unix, it is located in the log file "catalina.out". In Windows, it is located in the log file "stdout.log"

Struts 2 Cookbook

on Tuesday, February 12, 2008

This is the place I record down all my experiences in using Struts 2


  1. To bypass the validation when submitting the actions:

    1. Put onclick="form.onsubmit=null" on the s:submit tag

    2. In the struts-core.jar, change the struts-default.xml. Inside this file, it defines "input","browse","cancel","back" as excluded methods during validation. You can add in more as a customization for struts 2 framework.