Monday, March 29, 2010

Roadmap for Axis2M

Recently Andreas Veithen one of the team member of Apache Axis and Synapse projects have written a nice article about Axis2 Spring integration and compare available 3rd party modules for that. He has reviewed WSo2 WSF- Spring and Axis2M-Spring module with their positive and negative points.

Since I'm the core developer of Axis2M project those feedback are very important to me and I thought it's better to write something about the road map of Axis2M Spring project.

Very initial objectives of Axis2M Spring project are listed below.
  • Provide a simple approach to deploy Axis2 services using Spring context.
  • Provide a simple approach to deploy Axis2 modules using Spring Context.
  • The above two should be similar to approaches used by the other WS stacks , as a example services and modules can be define as any number of top level beans.
  • Provide the Spring Namespace support for service and module deployment.
  • For module deployment provide a Spring factory approach so that POJO beans can be used as the module components such as Handlers and Module , at the run time required legacy components are populated with the help of configuration settings of Spring context.
  • Support for Spring OXM package as a new data binding option , this will introduce two new data binding support for Axis2 as Castor and XStream.
  • Provide several new Maven archetypes for quick start-up of Axis2 integrated user projects.
Axis2M M2 version supports for above seven features and due to some design limitation and time limitation Axis2 configuration and WSDL support left out from M2 version . Here is my current plan for above these scenarios.



Axis2 Configuration based on SpringContext (axis2.xml)

In this case I'm completely agree with Andreas comments about the approach used by the WSF-Spring project . Due to this design issue Axis2M don't use WSF-Spring approach and use traditional axis2.xml based approach for this version. According to me the main reason was WSF-Spring simply tried to replace each of axis2.xml file's element using a Spring bean without care much about the use of modularity or dependency injection. This is the plan on my mind for Axis2M Axis2 configuration.

  1. Since Axis2 is a very matured project some of the developers already familiar with axis2.xml based configuration, due to this reason Axis2M keep the traditional approach so that users can use axis2.xml to define configuration . But Axi2M will introduce a approach to define configuration on Spring context as beans and those Spring beans override the axis2.xml configuration if it exists.
  2. Instead of a single top level configuration bean, each of the configuration sub element such as message receivers , message builders can be define as a top level beans. At the start-up time, the framework will detect those beans related to Axis2 configuration and inject them in to the Axis2 configuration. It's also possible to override the setting define in the axis2.xml file.
  3. Provide the Spring Namespace support for those configuration beans.
  4. Provide a way to use POJOs as legacy configuration components. As an example a user can write pure java bean then in the configuration level possible to convert it in to a Axis2 legacy components such as message receivers or message builders etc. Axis2M already employ this approach for Module deployment but design a smiler approach for Axis2 configuration is a one challenge to achieve. Also this approach will not work for all the configuration beans. One of the good example is Spring-Integration (SI) project that convert POJOs in to EIP components like routers , transformers etc.

Axis2M WSDL handling

Axis2 provides only two options for WSDL handling either user can utilize automatic WSDL generation feature or he can provide a existing WSDL file. But IMO a Axis2-Spring integration project should provide more control options to users and should utilize configuration context too. Axis2M future plan is to provide a approach that similar to approach used by the Spring-WS project for WSDL handling. As an example a user can provides one portion of the WSDL content dynamically using Spring context while remaining portions of the WSDL is based on default automatic WSDL generation or provided raw WSDL file .


BTW Axis2 WSDLSupplier only supports for WSDL 1.1 , implementing above approach for both WSDL 1.1 and WSDL 2.0 is also a challenge and require some modification from Axis2 side too.

Other than above two Andreas listed several important features as his wish list , Axis2M will try for them in future.


But I like to add two more features , even very initial stage of Axis2M project I wanted to support Servlet + Spring + JAX-WS use case in the same way as CXF or Metro does. but AFAIK still some issues exists in the Axis2 side, some of them discussed in following places link-1, link-2.


Secondly it is very practical to integrate Axis2-Spring integration with Spring- security project (Acegi) so that users can utilize existing Acegi security for their web services too, but this need very careful design. This post describe one possible solution to integrate Acegi with Apache Rampart module.

3 comments:

Andreas Veithen said...

I started to put together some PoC code [1] for some of the things I mentioned in my blog post. For the moment this code is completely orthogonal to your code, i.e. it addresses different parts of the overall problem. There is also a user who is contributing some interesting ideas [2]. I think it's time to discuss how to bring together these efforts into a single project. Since you are already an Axis committer, what do you think about doing this under the umbrella of the Axis2 project?

[1] https://svn.apache.org/repos/asf/axis/axis2/java/core/scratch/java/veithen/spring/
[2] https://issues.apache.org/jira/browse/AXIS2-4662

sagara said...

Yes,I'm really happy to bring my effort under Axis2 because I know the value of supporting Axis2 it self for this.

paul said...

cool. i would also like to share a spoon-feed tutorial on serializing and deserializing java objects/XML using Spring OXM and Castor O/X Mapping Framework. You can find it here:


http://www.adobocode.com/spring/marshallingunmarshalling-java-objects-into-xml-file-using-spring-oxm


hope this helps others too...