S.A. Sameera Jayasoma





JAX-WS 2.0 support for Apache Axis2 WSDL2Java Code Generator.


Apache Axis2, the third generation Web services engine is bundled with a number of promising features. One of the most important features that has a wide usage is the Code Generation tool. It can parse a WSDL document and more importantly generate the service and client code without the human intervention. The usability and the flexibility of the code generation tool are the crucial factors that determines the wide adoption of Apache Axis2 in the real world. The usability of the code generation tool refers to the ability to help users to make better use of Axis2 easily and effectively. The flexibility of the tool refers to the ability to enhance its core functionality by extending or customizing.

Java API for XML Web Services (JAX-WS) is a technology designed to standardized the construction of web services and web service clients in Java. JAX-WS 2.0 describes set of mappings from a service defined in a WSDL to Java classes and vice versa. JAX-WS 2.0 delegates the data binding related-task to JAXB 2.0.

The ultimate goal of the project would be to enhance the current wsdl2java code generation tool to generate client and server code based on the mappings described in the JAX-WS specification. Axis2 gains lot of benefits upon completion of this project. Extending the functionality of the code generation tool to generate JAX-WS compliant code will increase the usage of Axis2 by adding a new option which enable the integration of Axis2 to other J2EE containers(eg, Geranimo). This way it can be used to develop standard Web services and clients with Axis2.

Project Overview

In a Web services world, there are several approaches to develop services. One can start from the WSDL and generate the required server and client side classes. The other way is to start from an implementation class and generate both WSDL files and other Java classes. JAX-WS describes set of standard mappings to be followed when generating Java classes form WSDL and vice versa. In addition to the set of standard mappings it describes a standard way to customize these mappings. There are two =customization methods, WSDL Annotations and Java Annotations. WSDL Annotations are standard annotations that may be used either within WSDL documents or as in an external form. The specification also defines standard Protocol Binding and Transport Bindings.

According to my initial studies, I have identified several key areas in the Axis2 wsdl2Java code generation tool, that needs to be changed. The central component in the tool is the code generation engine, Its main duty is to call extensions one by one and then it invokes a component called Emitter which is a language dependent component. The Emitter loads the templates (*.xsl) and parse them against the relevant XML models produced by processing the WSDL. The current Java emitter generates code in a Axis2 specific style. It seems to be better starting off with a new class which extends from the current Java emitter class and overrides the required methods. The other requirement would be to develop the set of new templates which contains JAX-WS compliant code segments.

The Approach I have described above may not be the correct way to start this project. Since there is an interim period of nearly one and half months before the coding phase begins, the best way to implement these features can be discuss in the Axis2 community through the mailing list. As far as I know this is the open source culture. This project will greatly help me to gain a whole set of new experiences to my carrier.


1.Publish my ideas and the design plans on this project to the Axis2 Community and try to get some feedback and suggestions on my design plans. In the mean while, I will get familiar with the existing Axis2 code base specially with the code generation tool.

(will be finalized on 28th May or even before)

2.Implement features in the order they are specified in the overview. The first task would be to implement the server and client side code generation without the support for customizing the standard mappings. Prior to this I need to develop a set of templates and a Emitter compatible with the JAX-WS. Throughout this period I will develop a suite of test cases to determine whether the requirements of this project are fully satisfied.

(will be finalized before 09th July)

3.Improve the current implementation to support the customizable mappings. This may needs to do some changes to the existing code generation tool. (Not clear at the moment, need to do some study on this). Improve the test cases to reflect these changes. The final and the most important task is to develop a better documentation, useful for the users as well as the developer who would like to involve in this project later.

(will be finalized before 20th August)


I am an 22 year old student from the town Matugama, which is located in the Western Province in Sri Lanka. With the age of sixteen, I got an opportunity to participate in the Sri Lanka National Informatics Olympiad – SLNIO (2000). Currently I am an undergraduate (Level 3) in the Computer Science and Engineering Department at University of Moratuwa, Sri lanka. In December 2006, I got an opportunity to join with the university team (consists of 3) to participate in the ACM-ICPC (ACM-International Collegiate Programming Contest) Regional Contest held in Kanpur, India.

Since about seven months, I have been contributing to the open source projects specially to Apache Web service projects including Apache Axis2 and Apache Axiom. I have implemented the Pinging capability which enables users to monitor the status of the Web services. I have also implemented the E4X specification in Rhino using Apache Axiom. The goal of this project is to make the JavaScript Web service in Apache Axis2 faster. In addition to this I have submitted several bug reports and patches to Apache Axis2 and Apache Axiom time to time (AXIS2-2244, 2233, 2186, 1356, 1190, 1174, 1178, WSCOMMONS-132, 121, 115 )


During the last seven months, my involvement in the open source development made me more biased to it. I found that the open source development very interesting. Not only it improves the open source projects but also it helps to build our own carrier. As far as I know the most important aspect of the open source development is the collaborative effort to develop softwares. In other words it is an community based development. I found this project really interesting as it develops an important feature to Axis2 as well as it gives me an opportunity to continue my contribution to Apache Axis2.