Thomas Pawlitzki ha scritto:
Hello,
i wounder if there is there is a possibility to influence the
generation of the ADBs.
I have a XSD which defines the data structures of a webservice. I use
this xsd to generate the ADBs. As the ADBs covers the hole data of my
business logic i want to use them as business objects, too. So my
clients create objects of them, pass the objects into my logic, I do
some validation and computing and I send them via WebService easily.
But therefore the ADBs must implement java.io.Serializable.
Is there a possibillity to generate the ADBs implementing this interface?
Thanks a lot.
You can do the following:
1) download Axis2 SRC distributon
2) extract
axis2-1.3\modules\adb-codegen\src\org\apache\axis2\schema\template\ADBBeanTemplate.xsl
and change it by adding the "implements java.io.Serializable" to the
generated code
3) extract
axis2-1.3\modules\adb-codegen\src\org\apache\axis2\schema\schema-compile.properties
and change the value of schema.bean.writer.template so that it points to
your modified template
4) run WSDL2Java generator setting the Java system property
org.apache.adb.properties so that it points to your own
schema-compile.properties, i.e.:
java -Dorg.apache.adb.properties=my-own/schema-compile.properties -cp
<full classpath!> org.apache.axis2.wsdl.WSDL2Java <your options> -uri
YourWSDL.wsdl
You'll find some hints at:
http://ws.apache.org/axis2/1_3/adb/adb-tweaking.html
Good luck!
--
Mauro Molinari
Software Developer
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]