Hello Thierry,

you are taskdefing the wrong class, the class you are entering in your taskdef does not exist or cannot be used as an ant task (no execute method)

a short search in google tells me this :

  <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
      <classpath path="jaxws.classpath"/>
  </taskdef>

Regards,

Antoine


On Aug 20, 2006, at 5:52 PM, Thierry Rietsch wrote:

Hi all

I like to run the com.sun.tools.ws.WsGen tool from the build.xml. For
that I defined a taskdef in my build.xml:

<taskdef name="wsgen" classname="com.sun.tools.ws.WsGen">
        <classpath path="wsgen.classpath" />
</taskdef>

and the related classpath:

<path id="wsgen.classpath">
        <pathelement location="${java.home}/lib/tools.jar" />
        <pathelement location="${java.jaxws.home}/lib/jaxws-tools.jar" />
</path>

The java.home and java.jaxws.home properties are set.

When I try now to run ant with this build file, I get an the following
error:

taskdef class  com.sun.tools.ws.WsGen cannot be found

On command line I could run:
java -cp
/opt/java/lib/tools.jar:/home/xxx/applications/java/jaxws/lib/jaxws- tools.jar
com.sun.tools.ws.WsGen

It works. From that I think I've included all necessary libraries in the wsgen.classpath. It looks for me, that ant is ignoring the wsgen.classpath.

Could anyone help me?

Thanks a lot

thierry


Reply via email to