[jboss-user] [JBossWS] - wsconsume Ant task fails to find

balkanboy do-not-reply at jboss.com
Wed Oct 17 19:57:37 EDT 2007


I have the following in my build.xml:


  | <path id="web.services.classpath">
  |     <fileset dir="${env.JAVA_HOME}/lib" includes="*.jar" />
  |     <filesetdir="${jboss.home}/lib/endorsed/"  includes="*.jar" />
  |     <fileset dir="${jboss.home}/lib/" includes="*.jar" />
  |     <fileset dir="${jboss.home}/client/">
  | 	<include name="activation.jar" />
  | 	<include name="getopt.jar" />
  | 	<include name="wstx.jar" />
  | 	<include name="jbossall-client.jar" />
  | 	<include name="log4j.jar" />
  | 	<include name="mail.jar" />
  | 	<include name="jbossws-spi.jar" />
  | 	<include name="stax-api.jar" />
  | 	<include name="jaxb-api.jar" />
  | 	<include name="jaxb-impl.jar" />
  | 	<include name="jaxb-xjc.jar" />
  | 	<include name="streambuffer.jar" />
  | 	<include name="stax-ex.jar" />
  | 	<include name="javassist.jar" />
  | 	<include name="jboss-xml-inding.jar" />
  | 	<include name="jbossws-client.jar" />
  | 	<include name="jboss-jaxws.jar" />
  | 	<include name="jboss-jaxrpc.jar" />
  | 	<include name="jboss-saaj.jar" />
  | 	<include name="jboss-srp-client.jar" />
  | 	<include name="jbossws-common.jar" />
  | 	<include name="jaxws-tools.jar" />
  | 	<include name="jaxws-rt.jar" />
  |     </fileset>
  | </path>
  | 
  | <target name="wstaskdef">
  |     <taskdef name="wsconsume" 
  |                   classname="org.jboss.wsf.spi.tools.ant.WSConsumeTask">
  | 	<classpath>
  | 	    <path refid="web.services.classpath" />
  | 	</classpath>
  |     </taskdef>
  | </target>
  | 
  | <target name="wsdltojava" depends="init,wstaskdef">
  | <wsconsume fork="false" 
  |                    verbose="true" 
  |                    destdir="${classes.gen.dir}"
  |                    sourcedestdir="${src.gen.dir}" 
  |                    keep="true" package="com.example.wsclient"  
  |                    wsdl="${resources.dir}/wsdl/DataMartService.wsdl" 
  | wsdlLocation="http://localhost:8080/datamart/DatamartRemote?wsdl" />
  | </target>
  | 

And a WSDL that contains a type like this:


  | <xs:complexType name='brmEntry'>
  |     <xs:sequence>
  |      <xs:element minOccurs='0' name='barcode' type='xs:string'/>
  |      <xs:element minOccurs='0' name='barcodeType' type='xs:string'/>
  |      <xs:element minOccurs='0' name='idTag' type='xs:string'/>
  |      <xs:element minOccurs='0' name='imageStream' ns1:expectedContentTypes='application/octet-stream' type='xs:base64Binary' xmlns:ns1='http://www.w3.org/2005/05/xmlmime'/>
  |      <xs:element minOccurs='0' name='timestamp' type='xs:dateTime'/>
  |     </xs:sequence>
  | 

When I invoke the 'wsconsume' task from Ant, I get the following:

package javax.activation does not exist
[wsconsume] import javax.activation.DataHandler;
[wsconsume]                         ^
[wsconsume] BrmEntry.java:50: cannot find symbol
[wsconsume] symbol  : class DataHandler
[wsconsume] location: class com.raf.uspsbrm.datamart.wsclient.BrmEntry
[wsconsume]     protected DataHandler imageStream;

The only way I was able to get around this issue is to add "activation.jar" to Ant's classpath (I'm using Ant 1.7), or use the 'wsconsume.sh' script.

Does anyone have any idea how to fix the Ant task without necessarily altering Ant's CLASSPATH or is this necessary for 'wsconsume' to work from within Ant?

Thanks in advance!
Martin

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096337#4096337

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096337



More information about the jboss-user mailing list