Hi devs,

I went through(debugged) the WSDL2Java codegen engine of Apache CXF. seems
like this tool suits our requirements.
It generates

 JAX-WS compliant artifacts.
supports new databindings as plugins.
It currently supporting JAXB & xmlbeans databindings.

let me explain the process of code generation in brief,

first it parse the command line options and store them in the tool context.
Then it builds up the javaModel of the given WSDL.
As I understood this model is independent of the CXF core.(In Axis2 , they
are using AxisService, which is a part of Axis2
 kernel to store the information).Then according to the user requested
frontend the code generation happens.(default being the JAX-WS frontend). In
front end there is set of generators that responsible for generating
atrtifacts. for an example SEIgenerator is
responsible for genrating SEI. I find this approach quite good over the
Axis2 Approach of one large client stub flled with everything.

then again for code generation CXF tool uses Apache velocity. The tool
injects the values stored in the JavaModel in to the velocity
engine and the velocity do the rest according to the given template. In
Axis2 they use intermediate XML & XSLT to achieve this.

As my understanding since we want modifications such as generating artifacts
from WSDLs that contains only portType(interface)
CXF tool provides much more flexibility over Axis2 one.To do this we can
take out some binding related generators from the frontend & some
modifications to the velocity templates,(there can be other changes too)

but there are some few areas we have to look at, the CXF WSDL2Java tool,

does not support WSDL2 (i saw it as a TODO)
we have to add databinding support for SDO,ADB(axiom),


Im yet to explore the object model that tuscany uses to represent the info
in WSDL & expecting few tips on this regard. But right now i feel that the
CXF model is  good enough.(not sure).

Any thoughts ,suggetions anything you might think that is useful is warmely
welcome.

-- 
Pradeep Fernando.

Reply via email to