DBDavide wrote:
...

I've seen your and Ajith comments on
http://issues.apache.org/jira/browse/AXIS2-2007.
Yes I'm using ADB, pratically just modifying a service.xml to expose my
existing pojo class. So exceuse my newbie questions:

Is there any way to set up Axis2 to use by default xmlbeans databinding
instead of ADB?
You can do this with a -d xmlbeans parameter passed to WSDL2Java when you generate the code.
Give that I already have a ready pojo class to expose, my step should be:

#1 Save the Axis automagically generated wsdl for my pojo

#2 Use the wsdl as input to WSDL2Java specifying that I want serverside
skeletons and xmlbeans databinding

#3 Fill the skeleton with my old pojo business logic or better delegate the
methods 1 to 1 from the skeleton to my pojo.

#4 jar everything and deploy again.

Regarding the #1 could I modify the wsdl before running WSDL2Java? I ask
this because, right now to get rid of this quirk (
http://issues.apache.org/jira/browse/AXIS2-1931 ) I recompiled Axis sources.
You can definitely modify the WSDL generated by Axis2 Java2WSDL. I recommend to anyone using this that they at least clean up the generated schema, since it's a very basic form that doesn't represent things very efficiently.

There are some quirks when using XMLBeans, in terms of how you construct and populate the data objects. I'll try to add both XMLBeans and ADB versions to the sample I provided for JiBX on the wiki site within the next day or two, so that people can see how the three work out in practice. The Quick Start guide at http://ws.apache.org/axis2/1_1_1/quickstartguide.html gives you a trivial example now.

If you're working with several services based on existing pojo code you may also want to consider using JiBX (my data binding creation), which lets you work directly with your existing classes. The downside is that you need to create a binding definition for JiBX, and although that's pretty well documented on the JiBX site (http://www.jibx.org) it can be a little overwhelming if you're just doing a simple one-off project. There is a tool to generate a simple default binding for you, and another that generates a schema from the binding + code, but these are both out of date and you end up needing to do a fair amount of hand modification. I'm working on getting these tools updated now.

 - Dennis

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to