I didn't use the ant <apply> task but instead used the <java> task. It has a
fork option that I found was required in order to get things to work
properly (someone else might be able to explain why...)
Here is my WSDL2Java build steps (one for server-side, one for the client):
<!-- generate axis client .java files -->
<java classname="org.apache.axis.wsdl.WSDL2Java"
classpath="${axis.classpath}" fork="true">
<arg line="-p packagename"/>
<arg value="-o"/> <!-- -o path follows -->
<arg path="${g4-src.src}"/>
<arg path="${g4-wsdl.src}/das.wsdl"/>
</java>
<!-- generate axis server .java files -->
<java classname="org.apache.axis.wsdl.WSDL2Java"
classpath="${axis.classpath}" fork="true">
<arg line="--server-side --skeletonDeploy true -p packagename"/>
<arg value="-o"/> <!-- -o path follows -->
<arg path="${g4-src.src}"/>
<arg path="${g4-wsdl.src}/dasEv.wsdl"/>
</java>
I saw a mention of a <WSDL2Java> task but haven't looked into it yet. You
might want to investigate that as well.
Good luck!
alan
> -----Original Message-----
> From: Agrawal, Anuj (Anuj)** CTR ** [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 20, 2002 5:22 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: WSDL2JAVA problem
>
>
> Well, we have crimson.jar in our CLASSPATH (see <apply> in
> our ant target below). I've tried replacing that with
> xerces.jar but no dice. 8( Also, we've run it with JDK1.3.1
> and JDK1.4, both give similar results (NullPointerException).
>
> <apply executable="java"
> dest="${build.genwsdl.dir}" type="both">
> <env key="CLASSPATH"
> value="${tools.lib.dir}/axis.jar;${tools.lib.dir}/commons-logg
> ing.jar;${tools.lib.dir}/jaxrpc.jar;${tools.lib.dir}/log4j-cor
> e.jar;${tools.lib.dir}/tt-bytecode.jar;${tools.lib.dir}/wsdl4j
> .jar;${tools.lib.dir}/crimson.jar"/>
> <arg value="org.apache.axis.wsdl.WSDL2Java"/>
> <arg value="-s"/>
> <arg value="-Strue"/>
> <arg value="-a"/>
> <arg value="-o${build.genwsdl.dir}"/>
> <srcfile/>
> <fileset dir="${wsdl.dir}">
> <include name="*.wsdl"/>
> </fileset>
> <mapper type="merge" to="wsdlmade"/>
> </apply>
>
> Any other suggestions, please?
> Thanks.
> Anuj.
>
> > -----Original Message-----
> > From: Simon McClenahan [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 20, 2002 5:10 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: WSDL2JAVA problem
> >
> >
> > The first thing I would check is to make sure that you have
> > an XML parser in your classpath (it looks like you're running
> > ant, you can specify the classpath for that apply command). I
> > have found that NullPointerException and
> > ClassNotFoundException are usually thrown by Axis when no XML
> > parser is available, even though Axis does not give any hint
> > to that being the cause.
> >
> > cheers,
> > Simon
> >
> >
> > > -----Original Message-----
> > > From: Han Wang [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, May 20, 2002 4:03 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: WSDL2JAVA problem
> > >
> > >
> > > One more problem:
> > >
> > > I'm getting a null pointer exception and no description of
> > > the problem:
> > >
> > > [apply] java.lang.NullPointerException
> > > [apply] at
> > > org.apache.axis.wsdl.toJava.Utils.holder(Utils.java:494)
> > > [apply] at
> > > org.apache.axis.wsdl.toJava.JavaWriterFactory.constructSignat
> > > ure(JavaWriterFactory.java:512)
> > > [apply] at
> > > org.apache.axis.wsdl.toJava.JavaWriterFactory.constructSignat
> > > ures(JavaWriterFactory.java:478)
> > > [apply] at
> > > org.apache.axis.wsdl.toJava.JavaWriterFactory.writerPass(Java
> > > WriterFactory.java:106)
> > > [apply] at
> > > org.apache.axis.wsdl.toJava.Emitter.emit(Emitter.java:189)
> > > [apply] at
> > > org.apache.axis.wsdl.toJava.Emitter.emit(Emitter.java:155)
> > > [apply] at
> > > org.apache.axis.wsdl.WSDL2Java$WSDLRunnable.run(WSDL2Java.jav
> > > a:725)
> > > [apply] at java.lang.Thread.run(Thread.java:536)
> > > [apply] Result: 1
> > >
> > > when I try to run WSDL2JAVA.
> > > I can't post the wsdl, so does anyone have any clues?
> > >
> > > Thanks,
> > > Han
> > >
> > >
> >
>