You need to make sure that the containing jar file com.ibm.websphere.ant.tasks.WSDL2Javais in your path to lib.path.
<taskdef name="wsdl2java"
classname="com.ibm.websphere.ant.tasks.WSDL2Java">
<classpath refid="lib.path"/>
</taskdef>
If you are working on UNIX, you can scan this class using code similar to:
find . -type f -name "*.jar" | while read file
do
jar tvf $file | grep WSDL2Java && echo $file
done