Just as a follow up for anyone else interested in this topic. I was able
to achieve what I wanted using a combination of approaches. First was to
compile my application schemas into xmlbeans using the xmlbeans maven
plugin instead of axis2. Compiling these with the pre-existing model
(gml) xmlbeans as a maven dependency (i.e. on the classpath) means that
xmlbeans does not generate duplicates of them. Unfortunately this is not
the case for axis2 using an xmlbeans data binding. Instead I then used
the wdc option as an extra parameter for axis2 and then just deleted the
duplicated classes. I still don't know if the wdc option is actually
picked up or if I'd have gotten away without it because I don't see any
obvious difference to the classes generated. After including the two
other jars with the precompile xmlbeans as dependencies the service runs
fine. Well there is one other problem - Axis2 uses an older version of
xmlbeans 2.2.0 to the latest version of xmlbeans. This was causing
version errors in tomcat so I needed to delete the older xbeans jar.
Cheers Alistair
Alistair Edwardes wrote:
Hi Amila
Thanks very much for your response. I've been trying to build using
the maven plugin rather than the command line, but I noticed in the
source that the wdc option should be available. I've tried using it
but just examining the classes that are produced by I don't notice any
difference, so I don't know if it has actually picked it up. By dummy
class do you mean really that they're empty or that they're the same
but can be safely ignored? The other problem I have with the method is
that currently I have my own application schemas, which are imported
into the wsdl and which in turn import a standard model schema (gml).
It's actually only the package related to the standard schema that I
need to replace, how would that effect the wdc? would I need to inline
my application schemas in the wsdl? Actually I had hoped that for the
external mapping there would be a way to just map a name space to a
package (of pre-generated beans) but that doesn't seem the case - is
that a possible future option?
Cheers Alistair
Amila Suriarachchi wrote:
hi,
The external mapping option was there from lot of time and there were
not request
for this feature. So I have not done much testing with it and I'll
have a look at onit once have a time.
For Xmlbeans you can use the -Ewdc option.
This basically generates some dummy classes for the element refer
from the wsdl.
So what you can do is to First generate the code with this option and
then delete the dummy
classes.
Then generate the Xmlbeans classes using the scomp command comes with
the Xmlbeans distribution.
Then add those classes to class path.
thanks,
Amila.
On Jan 31, 2008 4:52 PM, Mauro Molinari <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Alistair Edwardes ha scritto:
> which is similar to what I think you were trying to achieve
before too.
Hi Alistair,
actually I'm using ADB and I'm following the approach to carefully
choose namespaces so that the automatically mapped package names
of the
generated class files are the ones I want to be. Moreover, I know
WSDL2Java has -ns2p option that can help to map namespaces to Java
packages, although I didn't need to use it.
Anyway, thank you for sharing your results with XMLBeans with us,
they
can surely be very useful to many people.
Unfortunately, Axis2 official documentation is really poor about
this
kind of information :-(
--
Mauro Molinari
Software Developer
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
--
Amila Suriarachchi,
WSO2 Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]