Title/Summary  : 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.

Student:  Pradeep Rangana Fernando

Student e-mail : pradeepfn AT gmail DOT com

Student Major : Computer Science & Engineering

Student Degree :  Undergraduate

Student Graduation : End of 2010

Organization : Apache Software Foundation

Assigned Mentor : Raymond Feng

Abstract

      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  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.

Detailed Description

       Tuscany components can expose their services as Java interfaces or web interfaces. In the latter scenario they can publish their interface using WSDL s. Application developers have to write skeletons & stubs in order to deploy or consume services defined by WSDL. Code generators  commonly known as WSDL2Java comes handy in a situation like this, since it is capable of generating those Java artifacts using a WSDL as its input. We can make use of WSDL2Java tool to generate artifacts such as,

  • Service Endpoint Interface
  • Service
  • Exception classes mapped from WSDL
  • Value types generated from the given data-binding framework.

     Already there are  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,

  • JAX-WS wsimport requires the WSDL to have service/endpoint but SCA requires portType. Further it doesn't support other databindings other than JAXB. which is a big drawback.
  • Axis2 WSDL2Java does not generate artifacts that compliant 100% with JAX-WS specification.
  • CXF tool does not support SDO databinding.

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

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 Plan

The most important goals of the project are;

  • JAX-WS compliant artifact generation.
  • Design the tool such that you can incorporate several data binding frameworks.
  • generate code from WSDL s' that only have portTypes.

Here is the normal high level process in a WSDL2Java code generating tool :

  • 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 play.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 model that has the information related to web services contained 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.

Right now there are two prospective options :

  1. parse the WSDL & build a new model that contains the details related to web-service.(from the scratch)
  2. Tuscany has the code to create model out of IDL s such as Java, WSDL. Instead of building a new model we can make use of this existing model and build the tool upon that.

   I have to discuss this in the mailing list before deciding on the final solution. Further more I'm planning to observe and study wsimport tool & JAX-WS specification in order to make this tool a JAX-WS compliant artifact generator.

Additional Information

 Development Schedule

April 20 - May 23
   getting familiar with the Tuscany code, Discuss the issues regarding design & integration 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 from the 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.

Community Interaction

 Community interaction is a must in any open-software project.  I'll try to be transparent, as much as possible with my project design ,status, etc by discussing it in the Tuscany mailing list. I will maintain a wiki-page of the project so that other people can track down the status of the project. I will use #tuscany IRC channel for quick chatting & will avoid discussing decisions that should be discussed in the mailing list.
I have already started a mail thread to discuss this project . You can track it here http://www.mail-archive.com/dev@tuscany.apache.org/msg06084.html

commitment

Since I'm having summer vacation I'll be able to commit my full time towards this project. I'm planning to work more than 40+ hours per week on this project.

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 finished my third year studies & will start my final year at the end of this year.
    I have been working on web-services related technologies  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 the 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
JAX-WS Specification
Apache WSS4J
Apache WODEN
Apache AXIS2
Apache CXF
Computer Science and Engineering Department

  • No labels