2 Replies Latest reply on Dec 20, 2006 7:08 AM by Alexander Sahler

    JAXWSJBoss

    Bruno MAtos Newbie

      In the "Creating web service client in EJB module" netbeans 5.5 gives the following error:
      wsimport-init:
      C:\Documents and Settings\10050108\Desktop\pro_java\netbeans\WSCEJBModule\nbproject\build-impl.xml:218: taskdef class com.sun.tools.ws.ant.WsImport cannot be found.

        • 1. Re: JAXWSJBoss
          Alexander Sahler Newbie

          Yes, i've got the very same problem.

          In build-impl.xml the ant task is defined as this:

          <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
           <classpath path="${j2ee.platform.wsimport.classpath}"/>
          </taskdef>
          


          Changing the classpath to be:
          <classpath path="${libs.jaxws20.classpath}"/>
          

          fixes the build.

          I defined a library (JAX-WS) to point to the jwsdp-2.0 jars.
          But this fix breaks if build-impl.xml is regenerated next time by netbeans :-).

          I'm using netbeans 5.5.

          • 2. Re: JAXWSJBoss
            Alexander Sahler Newbie

            In your build.xml you can overwrite auto-generated targets from your build-impl.xml.
            Just copy the wsimport-init target to the build.xml file and change it to have the classpath ${javac.classpath}:

            <target name="wsimport-init" depends="init">
             <mkdir dir="${build.generated.dir}/wsimport/client"/>
             <mkdir dir="${build.generated.dir}/wsimport/binaries"/>
             <mkdir dir="${classes.dir}"/>
             <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
             <classpath path="${javac.classpath}"/>
             </taskdef>
            </target>
            

            You probably have to add the JAX-WS libraries to the project Libs.