You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Roy, Anthony" <An...@bl.uk> on 2004/08/02 11:16:21 UTC

RE: Java2WSDL via Ant - cannot get it to work!

> Your path should look like
> 
> <path id="java2wsdl.classpath">
>                  <path path="."/>
>                  <path refid="axis.classpath"/>
>                  <path path="classes"/>
>          </path>
> 
> Christophe

I have made the amendment, and the classpath now has a <path> element
pointing to the root directory of where the compiled classes are located,
but the java.lang.ClassNotFoundException:
uk.bl.bspa.estar.EstarMatcherService error still occurs! Any other
suggestions (I have checked that the compiled class is at the appropriate
place in the classpath!)?


> > -----Original Message-----
> > From: Roy, Anthony [mailto:Anthony.Roy@bl.uk]
> > Sent: Friday, July 30, 2004 11:10 AM
> > To: 'axis-user@ws.apache.org'
> > Subject: Java2WSDL via Ant - cannot get it to work!
> > 
> > Hi all,
> > 
> > I have been struggling for days trying to get Java2WSDL to work so 
> > that I can fully automate my build process. The closest I 
> have got is 
> > the
> > following:
> > 
> >     <target name="java2wsdl">
> >         <property name="NAMESPACE" value="ESTARMatcher"/>
> > 
> >         <!--
> >         <axis-java2wsdl
> >          output="${root.dir}/wsdl/descriptor.wsdl"
> >          location="${axis.server.url}/axis/services/ESTARMatcher"
> >          namespace="${NAMESPACE}"
> >          classname="uk.bl.bspa.estar.EstarMatchingService">
> >            <mapping namespace="${NAMESPACE}" 
> package="uk.bl.bspa.estar"/>
> >         </axis-java2wsdl>
> > 
> >         -->
> > 
> >         <path id="java2wsdl.classpath">
> >                 <path path="."/>
> >                 <path refid="axis.classpath"/>
> >                 <fileset dir="${build.webclasses.dir}" 
> includes="**/*" />
> >         </path>
> > 
> >         <echo message="${build.webclasses.dir}"/>
> > 
> >          <java classname="org.apache.axis.wsdl.Java2WSDL" 
> fork="true"
> >                 classpathref="java2wsdl.classpath">
> > 
> >            <arg value="-o"/>
> >             <arg value="${root.dir}/wsdl/descriptor.wsdl"/>
> >             <arg value="-l"/>
> >             <arg 
> value="${axis.server.url}/axis/services/ESTARMatcher"/>
> >             <arg value="-n"/>
> >             <arg value="ESTARMatcher"/>
> >             <arg value='-p"uk.bl.bspa.estar=ESTARMatcher"'/>
> >             <arg value="uk.bl.bspa.estar.EstarMatcherService"/>
> >         </java>
> >     </target>
> > 
> > As you can see, I have tried both the Axis Ant task, and 
> using Axis' 
> > Java2WSDL class directly.
> > 
> > In both cases Java2WSDL cannot see the 
> > uk.bl.bspa.estar.EstarMatcherService
> > class in the classpath. This I do not understand since the class is 
> > located in the ${build.webclasses.dir}.
> > 
> > Does anyone have any ideas on this, or on getting the poorly 
> > documented Ant task working?
> > 

-- 
Anthony Roy.

e: anthony.roy@bl.uk
 


**************************************************************************

Experience the British Library online at www.bl.uk 

Help the British Library conserve the world's knowledge. Adopt a Book.
www.bl.uk/adoptabook 

*************************************************************************

The information contained in this e-mail is confidential and may be legally
privileged. It is intended for the addressee(s) only. If you are not the
intended recipient, please delete this e-mail and notify the
postmaster@bl.uk : The contents of this e-mail must not be disclosed or
copied without the sender's consent. 

The statements and opinions expressed in this message are those of the
author and do not necessarily reflect those of the British Library. The
British Library does not take any responsibility for the views of the
author. 

************************************************************************* 


RE: Java2WSDL via Ant - cannot get it to work!

Posted by Arnaud Vezain <a....@nancy.fnclcc.fr>.
Is your build script to the root of your projet ?  If it isn't, have you
changed the basedir property of the <project> element to point the root of
your project.

I had myself problems of NoClassdefFound with classpath and axis Ant
tasks. I wrote a script with an embeded classpath property like :

<axis-java2wsdl output="${service.ws.dir}/${service.wsdl}"
location="${service.location}" namespace="${service.nsmapping}"
namespaceimpl="${service.nsmapping}"
classname="${service.package}.${service.name}"
implclass="${service.package}.${service.name}SoapBindingImpl">
  <classpath>
    <pathelement location="${bin.dir}" />
    <path refid="axis.classpath" />
    <path refid="tomcat.classpath" />
  </classpath>
  <mappingset>
    <mapping namespace="${service.nsmapping}" package="${service.package}" />
  </mappingset>
</axis-java2wsdl>

It works for me.