axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Flores, Raul" <raul.flo...@lmco.com>
Subject RE: Potential bug in Axis Ant task java2wsdl, 1.2beta2
Date Wed, 14 Jul 2004 23:48:14 GMT
Try setting the classpath for the java2wsdl task with a taskdef tag:


        <path id="wsdl.classpath">
            <pathelement location="${build.home}/WEB-INF/classes"/>
            <fileset dir="${build.home}/WEB-INF/lib">
                <include name="**/*.jar" /> 
            </fileset>
        </path>

        <taskdef resource="axis-tasks.properties"
classpathref="wsdl.classpath" />

        <axis-java2wsdl
            classname="com.my.class.NAME"
            location="http://localhost:8080/axis/services/dataservice"
            output="${build.home}/generated/MyGenerated.wsdl"
            namespace= ...


Raul


-----Original Message-----
From: Christopher A. Brooks [mailto:cab938@mail.usask.ca] 
Sent: Wednesday, July 14, 2004 6:11 PM
To: axis-user@ws.apache.org
Subject: Potential bug in Axis Ant task java2wsdl, 1.2beta2


Hi,

Can't seem to get the java2wsdl task in the new 1.2beta2 package to run
appropriatly.  Below is a portion of an ant file, and the output it
generates.  I think the second part of the task (the one that uses the
axis ant task) should have the same results as the first part, but it
dies with a class not found exception.  In addition, the ant task seems
to have some issues with a couple of unrelated jars that are not
included in the newer distribution.

Maybe my build environment is just setup incorrectly, but I tell both
methods to use the same classpath, and the file is most definatly on
it....comments?

--begin build file snipit--

	<!-- example declaration -->
	<path id="axis.classpath">
		<pathelement path="${bin.home}"/>
  		<fileset dir="${axis.home}">
			<include name="axis.jar"/>
			<include name="axis-ant.jar"/>
			<include name="commons-discovery.jar"/>
			<include name="commons-logging.jar"/>
			<include name="jaxrpc.jar"/>
			<include name="log4j-1.2.8.jar"/>
			<include name="saaj.jar"/>
			<include name="wsdl4j.jar"/>
  		</fileset>
	</path>

...

<target name="build-wsdl" description="Builds the wsdl based on
interfaces." depends="build-sources" >
	<!-- method one, equivilent to an exec -->
	<java classname="org.apache.axis.wsdl.Java2WSDL"
classpathref="axis.classpath" fork="yes">
		<arg value="-N" />
		<arg value="http://ca.usask.cs/i-help/webservice" />
		<arg value="--style" />
		<arg value="DOCUMENT" />
		<arg value="-l" />
		<arg value="${wsdl_location}" />
		<arg
value="ca.usask.cs.discussion.webservice.IDiscussion"
/>
	</java>

	<!-- method two, using the ant task -->
	<axis-java2wsdl
classname="ca.usask.cs.discussion.webservice.IDiscussion" 
	
namespace="http://ca.usask.cs/i-help/webservice" 
				    style="DOCUMENT" 
				    location="${wsdl_location}"/>
</target>

--end build file snipit--

--begin output--

build-wsdl:
     [java] log4j:WARN File option not set for appender [file].
     [java] log4j:WARN Are you using FileAppender instead of
ConsoleAppender?
     [java] log4j:ERROR No output stream or file set for the appender
named [file]. [axis-java2wsdl]  WARN [main] (JavaUtils.java:1197) -
Unable to find required classes (javax.activation.DataHandler and
javax.mail.internet. MimeMultipart). Attachment support is disabled.
[axis-java2wsdl] Java2WSDL ca.usask.cs.discussion.webservice.IDiscussion
[axis-java2wsdl] java.lang.ClassNotFoundException:
ca.usask.cs.discussion.webservice.IDiscussion
[axis-java2wsdl]        at
java.net.URLClassLoader$1.run(URLClassLoader.java:199)
[axis-java2wsdl]        at
java.security.AccessController.doPrivileged(Native Method)
[axis-java2wsdl]        at
java.net.URLClassLoader.findClass(URLClassLoader.java:187)
[axis-java2wsdl]        at
java.lang.ClassLoader.loadClass(ClassLoader.java:289)
[axis-java2wsdl]        at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
[axis-java2wsdl]        at
java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[axis-java2wsdl]        at
org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:186)
[axis-java2wsdl]        at
java.security.AccessController.doPrivileged(Native Method)
[axis-java2wsdl]        at
org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
[axis-java2wsdl]        at
org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
[axis-java2wsdl]        at
org.apache.axis.wsdl.fromJava.Emitter.setCls(Emitter.java:2050)
[axis-java2wsdl]        at
org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntTask
.jav
a:206)
[axis-java2wsdl]        at
org.apache.tools.ant.Task.perform(Task.java:341)
[axis-java2wsdl]        at
org.apache.tools.ant.Target.execute(Target.java:309)
[axis-java2wsdl]        at
org.apache.tools.ant.Target.performTasks(Target.java:336)
[axis-java2wsdl]        at
org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[axis-java2wsdl]        at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
[axis-java2wsdl]        at
org.apache.tools.ant.Main.runBuild(Main.java:609)
[axis-java2wsdl]        at
org.apache.tools.ant.Main.start(Main.java:196)
[axis-java2wsdl]        at org.apache.tools.ant.Main.main(Main.java:235)

BUILD FAILED
file:C:/Temp/ihelp/discussion/trunk/build.xml:306: Error while running
org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask

Total time: 6 seconds

--end output--

Thanks in advance,

Chris
--
Christopher A. Brooks
Research Officer, ARIES Group
University of Saskatchewan 
 
Email: chris.brooks@usask.ca
Mail: Christopher Brooks
  Department of Computer Science
  University of Saskatchewan
  57 Campus Drive
  Saskatoon, Saskatchewan, S7N 5A9
  Canada 


Mime
View raw message