You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Rathore, Amit Singh (STSD)" <ra...@hp.com> on 2006/07/10 16:49:30 UTC

[Axis2] Issues using Ant tasks

Hi Everybody,
Was using Axis1.x and was using following ant task to build my
application and everything was running smoothly.
<axis-wsdl2java 
	url="${javaFromWSDL.file}" 
	output="${build.stubs}" 
	deployscope="Application" 
	serverside="true"
/>

What will be the coutern part for the above task in Axis2.

I have tried the following 2 approaches but didn't work. I have added
all jar files to my classpath.

Approach 1:
<target name="javaFromWSDL" depends="setenv">
		<java classname="org.apache.axis2.wsdl.WSDL2Java"
fork="true">
			<classpath refid="classpath"/> 
		      <arg value="-uri"/>
		      <arg file="${javaFromWSDL.file}"/>
		      <arg value="-ss"/>
		      <arg value="-g"/>
		      <arg value="-sd"/>
		      <arg value="-o"/>
		      <arg file="${build.stubs}"/>
		 </java>
</target>

Approach 2:
<taskdef 
	name="AntCodegenTask" 
	classname="org.apache.axis2.tool.ant.AntCodegenTask" 
	classpathref="classpath" 
/>
<AntCodegenTask 
	wsdlfilename="${javaFromWSDL.file}" 
	output="${build.stubs}" 
	serverside="true"
	generateservicexml="true"
/>

I am also creating another taskdef as:
<taskdef 
	name="foreach" 
	classname="org.apache.axis.tools.ant.foreach.ForeachTask" 
	classpathref="classpath" 
/>
Again what is the counter part of this in axis2. I am using this foreach
to find wsdl files present in different directory locations by iterating
sub-projects.


Thanks in advance.

--
Amit

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org