Google Summer of Code 2009 Prposal

Organization

Apache Software Foundation

Subject ID

tuscany-wsdl2java

Subject

A WSDL2Java tool for SCA that supports JAX-WS mapping from WSDL portType to Java interface with pluggable XSD2Java for various databindings such as JAXB, SDO, DOM and AXIOM.

Assigned Mentor

Raymond Feng

Author

Pradeep Rangana Fernando

Email

pradeepfn AT gmail DOT com

Project title

A WSDL2Java tool for SCA that supports JAX-WS mapping from WSDL portType to Java interface with pluggable XSD2Java for various databindings such as JAXB, SDO, DOM and AXIOM.

Synopsis

Tuscany is an infrastructure that implements service component Architecture(SCA).It enables developers to integrate existing solutions as components and contributions so that developers only have to concentrate on their business logic implementation.Contributions can reside in a SCA domain and a domain can have a single runtime or multiple run times.

components can expose their services as web-services and references can access those using a web-services calls. WSDL(Web Services Definition Language) represents the interface of the web-service and it is desirable to have a tool that code-generate Java classes for a given WSDL. The set of artifacts that should be generated by such a tool is defined in JAX-WS spec. There are other WSDL2Java tools developed under several projects but there are some deficiencies with those tools when it comes to the SCA domain.

The main objective of this project is to implement a WSDL2Java tool that support:plug ability of different databinding frameworks,codegen for WSDLs' only having portTypes(no port required - SCA specific requirement) & JAX-WS compliant artifact generation.

Deliverables

1. A fully tested WSDL2Java tool that supports multiple databindings (mainly SDO-Service Data Objects ,JAXB,DOM & AXIOM-Axis Object Model) & generating artifacts compliant to JAX-WS specification.

2. Appropriate developer documentation that would enable the continuation of the project (May be adding more functionality in the future)

3. Relevant test cases which make sure the proper functionality of the implementation

4. Appropriate user documentation/tutorial that shows how to make use of the tool effectively in development process.

Project Details

Tuscany components can expose their services as Java interfaces or web interfaces.In the latter scenario they can publish their interface using WSDL.When accessing exposed web-services users have to write clients in order to access these services(this is just a sample use case). Code generators comes handy in a scenarios like this.These code generators are commonly identified as WSDL2Java tools since it is generating some java artifacts using a WSDL as its inout.A tool like this not only creates client service stub but there are many artifacts generated using this kind of tool according to options given by the user.We can make use of WSDL2Java tool to generate artifacts such as,

There are already some WSDL2Java tools available ,which has been developed under projects like Axis2,CXF, JAX-WS reference implementation(wsimport). But their are some deficiencies with those tools when it comes to SCA . some of those scenarios are,

To overcome these deficiencies its better to have a WSDL2Java tool for SCA. The tool should have the ability to plugin multiple databinding frameworks mainly such as SDO,JAXB,DOM,AXIOM,etc and ability codegen from WSDLs which are only having port types.Further the generated artifacts must comply with JAX-WS specification.

Project Plan

The most important features of the project are;

First we have to send the WSDL through a option parser to pick user given options set. Then the core part of the tool, (lets' say codeEngine from here onwards) comes in to paly.It first extract the schema related parts from the WSDL & feed it to the databinding framework (can be SDO,JAXB,DOM,AXIOM,etc) and get the generated classes and their mappings. Then the codeEngine builds up a object structure that has the information related to webservices contatained in the WSDL.After that we have to write the info in to a XML file(intermediate language) that is written according to a known template. Then using a XSL template we can process the intermediate language and generate the code. since we are using intermediate language is it possible to support multiple languages other than JAVA simply by writing the appropriate template.

The one I'm using is a method popular among most of the code-gen tools.But the initial design may changed since this needs to be discussed in the mailing list. I'm planning to look into other code-gen tools such as wsimport for their pros & cons.(as an example I have to look in to wsimport since i have to replicate a artifact generation similar to wsimport).

I may have to get support from other projects such as Aapche WODEN (WSDL20 parser) and WSS4J(WSDL11Parser),Apache Axis2,etc which is i'm willing to do, since some of these project are linked to this project.

Community Interaction

Community interaction is a must in any open-software project. You have to constantly update your status on the project & you have to discuss with the community when taking some sensitive decisions like design of the implementation, etc. I'll try to be transparent as much as possible with my project by discussing it in the mailing list. I will maintain a wikipage of the project so that other people can track down the status of my project.I will use #tuscany IRC channel for quick chatting & will avoid discussing decisions that should be discussed in the mailing list.

Commitment

Now I'm finished with my third year studies at my university and having a vacation.So I'll be able to commit my full time for this project. I won't quit contributing to Tuscany after completing this project. I'm considering this as my entry point to the Tuscany project.

Development Schedule

April 20 - May 23

getting familiar with the Tuscany code, Discuss the issues regarding design & integrating with Tuscany developers.Studying the JAX-WS specification since the artifacts generated by the WSDL2Java tool should be JAX-WS compliant.study the already available similar kinds of tools like WSDL2Java & wsimport .come up with a the Design,requirements test scenarios after discussing with community.

May 23 - July 12

First phase of the project. starting coding according to the design that was agreed. In this phase I will implement option parsers, codegen Engine that takes care of the task related to retrieving web-service related information from WSDL, delegating and mapping schema compilers etc.

July 13

mid-term evaluation of the project.

July 14 - August 17

Second phase of the project. Reviewing the Work that have done up to now with the community, fixing JIRA s' of the code contributed. Revising requirements if needed & continue the development according the agreed decisions. In this I will have to write required XML transformers that generate the required artifacts using the information retrieved by codegen engine .At the latter phase of the project I'll be focusing on writing samples,test-cases,developer-guides & user-guides(Tutorial).

August 17 - August 24

code review, fixing JIRA s' of already contributed code, improving documentation. Testing for various use-cases & submit for final evaluation.

Future Enhancements

After successful completion of the project i am planning to make this tool available as a eclipse plug-in, so it will be easy to use right from the development environment.

Biography

I'm a 22 year old undergraduate student majoring Computer science & Engineering at the Dept of Computer science & Engineering ,university of Moratuwa , Sri Lanka.I have currently finshed my third year & will start my final year at the end of this year.

I have been working on web-services related technologies for for more than 6 months and quite familiar with the open-source development procedure. I have worked on Apache Axis2 project as my first open source project.I have contributed to it by, Enhancing its' REST capabilities using annotations based mechanism & XML based mechanism. Improving its' client API to support WSDL2.0 (improving service-client, etc ). And submitting patches.

Since I've been working with Axis2 i have a sound knowledge in technologies/specificatons/projects such as java & XMl, WSDL, XSLT, SVN, Apache-Maven, Apache-ant, WSS4J & WODEN parsers, AXIOM & JAXB. I'm very interested in community based development and web-services and want to contribute to open-source software more, in the future.I am sure that the previous work I have done in the web-services domain & the technologies I've been exposed by doing so, will help me a lot to successfully complete this project.

References

Apache Tuscany

WSDL Specification

JAX-WS Specification

Apache WSS4J

Apache WODEN

Apache AXIS2

Apache CXF

Computer Science and Engineering Department