[jboss-user] [JBossWS] - Problem with wsconsume ant task
tpawankumar
do-not-reply at jboss.com
Wed Nov 7 01:42:23 EST 2007
Hi All,
I am using wsconsume ant task for generating client side artifacts.
The following is ant task
| <target name="generateStub2" description="Generates classes">
| <taskdef name="wsconsume" classname="org.jboss.wsf.spi.tools.ant.WSConsumeTask">
| <classpath refid="wscon.classpath"/>
| </taskdef>
| <wsconsume
| verbose="true"
| destdir="output2"
| sourcedestdir="gen-src2"
| keep="true"
| wsdl="http://localhost:8080/McafeeAdapter?wsdl">
| </wsconsume>
| <jar destfile="./lib/client.jar" basedir="./output2">
| </jar>
| </target>
It is able to generate stubs using local WSDL file.
But when i use the following task for remote WSDL file
| <target name="generateStub1" description="Generates classes">
| <taskdef name="wsconsume" classname="org.jboss.wsf.spi.tools.ant.WSConsumeTask">
| <classpath refid="wscon.classpath"/>
| </taskdef>
| <wsconsume
| verbose="true"
| destdir="output1"
| sourcedestdir="gen-src1"
| keep="true"
| wsdl="http://testdrive.mcafeeasap.com/ws/mop/mop.asmx?wsdl">
| </wsconsume>
| <jar destfile="./lib/mcafeeClient.jar" basedir="./output1">
| </jar>
| </target>
|
It is giving following exception
[wsconsume] Consuming wsdl: http://testdrive.mcafeeasap.com/ws/mop/mop.asmx?wsdl
[wsconsume] parsing WSDL...
[wsconsume] [ERROR] Failed to read the WSDL document: http://testdrive.mcafeeasap.com/ws/mop/mop.asmx?wsdl, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>.
[wsconsume] unknown location
[wsconsume] Failed to parse the WSDL.
[wsconsume] Failed to invoke WsImport
[wsconsume] java.lang.IllegalStateException: WsImport invocation failed. Try the verbose switch for more information
[wsconsume] at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumerImpl.java:190)
[wsconsume] at org.jboss.wsf.spi.tools.WSContractConsumer.consume(WSContractConsumer.java:189)
[wsconsume] at org.jboss.wsf.spi.tools.ant.WSConsumeTask.executeNonForked(WSConsumeTask.java:206)
[wsconsume] at org.jboss.wsf.spi.tools.ant.WSConsumeTask.execute(WSConsumeTask.java:226)
[wsconsume] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
[wsconsume] at org.apache.tools.ant.Task.perform(Task.java:364)
[wsconsume] at org.apache.tools.ant.Target.execute(Target.java:301)
[wsconsume] at org.apache.tools.ant.Target.performTasks(Target.java:328)
[wsconsume] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[wsconsume] at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[wsconsume] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:377)
[wsconsume] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:135)
The following are the jars which are used for running the task
| <path id="wscon.classpath" >
| <pathelement path ="./lib/activation.jar"/>
| <pathelement path ="./lib/tools.jar"/>
| <pathelement path ="./lib/getopt.jar"/>
| <pathelement path ="./lib/wstx.jar"/>
| <pathelement path ="./lib/jbossall-client.jar"/>
| <pathelement path ="./lib/log4j.jar"/>
| <pathelement path ="./lib/mail.jar"/>
| <pathelement path ="./lib/jbossws-spi.jar"/>
| <pathelement path ="./lib/jaxws-tools.jar"/>
| <pathelement path ="./lib/jaxws-rt.jar"/>
| <pathelement path ="./lib/stax-api.jar"/>
| <pathelement path ="./lib/jaxb-api.jar"/>
| <pathelement path ="./lib/jaxb-impl.jar"/>
| <pathelement path ="./lib/jaxb-xjc.jar"/>
| <pathelement path ="./lib/stax-ex.jar"/>
| <pathelement path ="./lib/streambuffer.jar"/>
| <pathelement path ="./lib/javassist.jar"/>
| <pathelement path ="./lib/jboss-xml-binding.jar"/>
| <pathelement path ="./lib/jboss-jaxws.jar"/>
| <pathelement path ="./lib/jbossws-client.jar"/>
| <pathelement path ="./lib/jboss-jaxrpc.jar"/>
| <pathelement path ="./lib/jboss-saaj.jar"/>
| </path>
I am not getting what the problem is?
Am i missing any jars ,if the WSDL is remote.
Please help me.
Thanks in Advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102409#4102409
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102409
More information about the jboss-user
mailing list