1 Reply Latest reply on Feb 16, 2010 8:00 AM by Jay SenSharma MiddlewareMagic

    taskdef class not found while generating code from wsdl using ant

      I am getting class not found error while generating java codes from wsdl file.

      cu dmwls(338)$ ant generate-from-wsdl
      Buildfile: build.xml

      ++BUILD FAILED++
      ++file:/ffdt01/resmgt/kul/build.xml:14: taskdef class weblogic.wsee.tools.anttasks.WsdlcTask cannot be found++

      Total time: 1 second
      cu dmwls(339)$ cat -n build.xml
      1 <project default="all">
      2 <property name="bea.home" value="/opt/bea/wls/8.1sp4" />
      3 <property name="jdk.home" value="${bea.home}/jdk142_05" />
      4 <property name="weblogic.home" value="${bea.home}/weblogic81" />
      6 <path id="weblogic.classpath">
      7 <fileset dir="${weblogic.home}/server/lib">
      8 <include name="*.jar" />
      9 </fileset>
      10 </path>
      12 <taskdef name="wsdlc"
      13 classname="weblogic.wsee.tools.anttasks.WsdlcTask"
      14 classpathref="weblogic.classpath" />
      16 <target name="generate-from-wsdl">
      17 <wsdlc
      18 srcWsdl="/ffdt01/resmgt/kul/ksr.wsdl"
      19 destJwsDir="/ffdt01/resmgt/kul"
      20 destImplDir="/ffdt01/resmgt/kul"
      21 classpathref="${weblogic.classpath}"
      22 classpath="${weblogic.classpath}"
      23 packageName="examples.webservices.wsdlc" />
      24 </target>
      25 </project>

      I checked this class in weblogic.jar file using unzip command but there is no "WsdlcTask" class.

      unzip -l weblogic.jar | grep WsdlcTask  --- This gives not result

      I did search WsdlcTask class in all jar files under BEA_HOME directory by using below command but no WsdlcTask class found.

      cd $BEA_HOME
      find . -name *.jar -exec unzip -l {} \; | grep WsdlcTask  -- This also returns no results

      Is my weblogic.jar/jar file is missing some required classes or there is something wrong with my build.xml file?

      Please help.

        • 1. Re: taskdef class not found while generating code from wsdl using ant
          Jay SenSharma MiddlewareMagic
          Hi Kuldeep,

          The WSDLC task which you are using in WLS8.1 ehich is not correct..."weblogic.wsee.tools.anttasks.WsdlcTask" The above taskDef is present WLS9.x Onwards.

          Please use the following Task for WLS8.1 (http://download-llnw.oracle.com/docs/cd/E11035_01/wls100/webserv_ref/anttasks.html#wp1075710)


          Jay Sensharma
          http://jaysensharma.wordpress.com/webservices/ (WebLogic Wonders Are Here)

          Edited by: Jay SenSharma on Feb 16, 2010 1:30 PM