Hi Stefan,
AntCodegenTask, which is an Ant task for WSDL2Code facility, hasn't been
released after Axis2 1.1.1 release and 'WSDLCode' facility has been
upgraded to Maven2 plugin their after.
groupId -> org.apache.axis2
artifactId -> axis2-ant-plugin
version -> 1.35
plugin-repository -> http://dist.wso2.org/maven2/
Thus, you could easily use this plugin in your Maven2 system to generate
code.
There are many alternatives to use Ant and WSAS together. IMHO following
are most the simplest and most efficient.
1. in your build.xml
...
<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
<classpath
refid="axis2.classpath"/>
<classpath
location="${compiled.classes.dir}"/>
<arg line="-d adb -ss -sd -t -o target/wsdl/Test01 -u -uri
${wsdl.source.dir}/Test01.wsdl"/>
</java>
...
2. Write a xml file with following format,
say. codegen.xml
<config>
<!-- CommodityQuote Sample-->
<set>
<uri>./wsdl/CommodityQuote.wsdl</uri>
<o>./target/generated</o>
<p>org.wso2.wsas.sample.commodityquote.client</p>
<d>adb</d>
<u/>
<ns2p>http://www.wso2.org/types=org.wso2.www.types.client</ns2p>
<Emp>org.wso2.wsas.sample.commodityquote.mapper.client</Emp>
</set>
</config>
You can write as many <set/> elements as possible.
Then in your build.xml
...
<java classname="org.wso2.utils.codegen.CodegenHelper"
fork="true">
<arg value="${some_location}/codegen.xml"/>
<classpath refid="axis2.classpath"/>
</java>
...
HTH
Thank you
Saminda
stlecho wrote:
Hi,
In our current project we are using Axis2 to generate the server and client
code. To facilitate this generation, we are using the 'wsdl2java' Ant task
packaged with Axis2 (axis2-tools.jar). I searched for this tasks in the WSAS
distribution, but I have not found them.
Is the integration of these Ant tasks scheduled for a next release or is
there an alternative that allows me to use Ant and WSAS together?
Regards, Stefan Lecho.
_______________________________________________
Wsas-java-user mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/wsas-java-user