-
1. Re: Ant doesn 't Recognize WSConsumeTask
peterj Sep 27, 2007 2:05 PM (in response to ebonnett)Did you include this taskdef:
<taskdef name="wsconsume" classname="org.jboss.wsf.spi.tools.ant.WSConsumeTask"> <classpath> <path refid="xxx" /> </classpath> </taskdef>
where "xxx" points to the jbossws-spi.jar file? -
2. Re: Ant doesn 't Recognize WSConsumeTask
ebonnett Sep 28, 2007 10:21 AM (in response to ebonnett)No, I hadn't included that. Thanks! That definitely got me farther along. But, now I'm seeing a NoClassDefFoundError on WSConsume. It looks like this class is also in jbossws-spi.jar. So, WTF? I tried building a classpath that includes just about everything related to JBoss and JBossWS and got the same result. Any suggestions? I sincerely apologize if this is just my ignorance of Ant.
Eric
generateClientFiles:
Consuming wsdl: WebServicesTestService.wsdl
Command invoked: org.jboss.wsf.spi.tools.cmd.WSConsume -k -w handEdited.wsdl -o C:\XCAFE\CommonModules\WebServicesTest\output -s C:\XCAFE\CommonModules\WebServicesTest\gen-src -v WebServicesTestService.wsdl
java.lang.NoClassDefFoundError: org/jboss/wsf/spi/tools/cmd/WSConsume
Exception in thread "main"
C:\XCAFE\CommonModules\WebServicesTest\build.xml:176: Could not invoke WSConsumeTask
BUILD FAILED (total time: 0 seconds) -
3. Re: Ant doesn 't Recognize WSConsumeTask
ebonnett Sep 28, 2007 10:25 AM (in response to ebonnett)Hmm, looks like my script got stripped from the previous message. Let me try that again...
<path id="jbossws.classpath"> <fileset dir="C:/jboss-4.2.1.GA/client"> <include name="**/*.jar"/> </fileset> <fileset dir="C:/jboss-4.2.1.GA/lib"> <include name="**/*.jar"/> </fileset> <fileset dir="C:/jboss-4.2.1.GA/server/default/lib"> <include name="**/*.jar"/> </fileset> <fileset dir="C:/jbossws-native-2.0.0.GA/lib"> <include name="**/*.jar"/> </fileset> <pathelement location="C:/jbossws-native-2.0.0.GA/lib/jbossws-spi.jar"/> </path> <target name="generateClientFiles"> <taskdef name="wsconsume" classname="org.jboss.wsf.spi.tools.ant.WSConsumeTask"> <classpath> <path refid="jbossws.classpath" /> </classpath> </taskdef> <wsconsume fork="true" verbose="true" destdir="output" sourcedestdir="gen-src" keep="true" wsdllocation="handEdited.wsdl" wsdl="WebServicesTestService.wsdl"> </wsconsume> </target>
-
4. Re: Ant doesn 't Recognize WSConsumeTask
peterj Sep 28, 2007 12:07 PM (in response to ebonnett)That class (org/jboss/wsf/spi/tools/cmd/WSConsume) also appears in jbossws-native-2.0.0.GA/lib/jbossws-spi.jar.
I successfully generated the stubs using the path and target you posted, though I only required jboss-4.2.1.GA/client and jbossws-native-2.0.0.GA/lib in the classpath.
I would suggest downloading JBossWS 2.0.0GA again, youra might be corrupt. -
5. Re: Ant doesn 't Recognize WSConsumeTask
ebonnett Sep 28, 2007 1:55 PM (in response to ebonnett)I don't know about my original download being corrupt, but I followed your advice and downloaded it again, but I grabbed jbossws-native-2.0.1.GA.zip this time and ran ant deploy-jboss42 and voila! Now, my project's build script that calls the wsconsume works! Thank you!!!!!
Eric