axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Suriarachchi" <>
Subject [Axis2] Generate code for multiple services using wsdl2java
Date Tue, 06 Mar 2007 13:22:05 GMT
currently wsdl2java generates code for one service only. So It will improve
the usability of the wsdl2java tool if we can produce code for all the
services defined in the wsdl. In this regard I would like to propose the
following method (this seems to be working with the adb and xmlbeans) and
point out some possible issues.

When generating the code, first we get the axis service populated using
either WSDL11ToAxisServiceBuilder or WSDL20ToAxisServiceBuilder according to
the wsdl version and set it in the CodeGenConfiguration. Here we have to
change the CodeGenConfiguration (currently this keeps only one axis service
object) class to keep many axis services and WSDLBuilders should be
reportedly called to build the axis service object structure.

For the moment user can specify a service and a port to generate the code
using -sn and -pn parameters. so the first issue is how can we let the user
to define many services and ports he needs to generate the code? (what are
the options we are going to provide to let the user to specify these
services and ports in command line?)

Then the CodeGenConfiguration Object is passed to extensions to generate
code and do other things. currently In adb and xmlbeans it takes all the
shemas  from the axis service using getSchema method and generate the code.
Therefore for these databinding frameworks it is possible to add all the
schemas by iterating through all the availble axis services and generate the

Is this method feasible for jibx and other databindng frameworkds as well?
i.e to generate the databinding classes at once by passing the schema list?

Then emitting the stub the only thing to do is to generate the code
repeatedly for each file. In the emitskelton method the same can be followed
except for generating the service.xml where we can add all the service
details to one service.xml file.

Finally the ant build script creates a service archive file with the service
name (eg. service1.aar).  In multiple service case how are we going to
change this?

Here with I have attached a sample patch to illustrate the method I used.


Amila Suriarachchi,
WSO2 Inc.

View raw message