• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error using java2wsdl ant task

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Iam running a simple webservice using axis2-1.4 and apachetomcat .iam trying to run a java2wsdl from the ANT Build.xml file. Iam unable to do it. Iam geting the below exception
[axis-java2wsdl] java.lang.NoClassDefFoundError: javax/xml/rpc/encoding/TypeMappingRegistry

I have included axis-ant.jar,axis.jar in the axis2/lib folder.
Iam posting my build.xml below, can someone clarify my doubt please

<project name="StudentService" basedir="." default="generate.service">

<property name="service.name" value="SampleStudentService" />
<property name="dest.dir" value="build" />
<property name="dest.dir.classes" value="${dest.dir}/${service.name}" />
<property name="dest.dir.lib" value="${dest.dir}/lib" />
<property name="tomcat.home" value="C:/Program Files/Apache Software Foundation/Apache Tomcat 6.0.14/webapps" />
<property name="repository.path" value="${tomcat.home}/axis2/WEB-INF" />
<property name ="wsdl.dir" value="resources"/>

<path id="build.class.path">
<fileset dir="${repository.path}/lib">
<include name="*.jar" />
</fileset>
</path>

<taskdef resource="axis-tasks.properties"
classpathref="build.class.path" />

<target name="java2wsdl">
<axis-java2wsdl classname="org.apache.axis2.training.StudentWebService"
output="${wsdl.dir}/StudentWebService.wsdl"
location="http://localhost:8081/axis2/services/StudentWebService"
namespace="training.axis2.apache.org" style="RPC">
<classpath>
<pathelement location="./bin/org/apache/axis2/training/*.class"/>
</classpath>
<mapping namespace="training.axis2.apache.org" package="org.apache.axis2.training"/>
</axis-java2wsdl>
</target>

<target name="compile">
<javac srcdir="src" destdir="./bin" includes="org/apache/axis2/training/**">
<classpath refid="build.class.path" />
</javac>

</target>


<target name="clean">
<delete dir="${dest.dir}" />

</target>

<target name="prepare">
<mkdir dir="${dest.dir}" />
<mkdir dir="${dest.dir}/lib" />
<mkdir dir="${dest.dir.classes}" />
<mkdir dir="${dest.dir.classes}/META-INF" />
</target>



<target name="generate.service" depends="clean,prepare,compile">

<copy file="src/META-INF/services.xml" tofile="${dest.dir.classes}/META-INF/services.xml" overwrite="true" />
<copy file="./bin/org/apache/axis2/training/*.class" tofile="${dest.dir.classes}/org/apache/axis2/training/*.class" overwrite="true"/>
<copy file="./resources/StudentWebService.wsdl" tofile="${dest.dir.classes}/resources/StudentWebService.wsdl" overwrite="true"/>

<jar basedir="${dest.dir.classes}" destfile="${dest.dir}/${service.name}.aar" />

<copy file="${dest.dir}/${service.name}.aar" tofile="${repository.path}/services/${service.name}.aar" overwrite="true" />

</target>

</project>
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have included axis-ant.jar,axis.jar in the axis2/lib folder.



Have you included the JAX-RPC API (jaxrpc.jar)?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic