here is my build.xml
<?xml version="1.0" standalone="yes"?>
<path id='axis2.classpath'>
<fileset dir='D:\Tools\axis2-1.5.1-bin\axis2-1.5.1\lib'>
<include name='**/*.jar' />
</fileset>
</path>
<path id='compiled.class.path'>
<fileset dir='./bin/pkg'>
<include name='*.class' />
</fileset>
</path>
<taskdef resource="axis-tasks.properties" classpathref="axis2.classpath" />
<target name="run" >
<axis-java2wsdl
output="out/TestService.wsdl"
location="http://localhost:8080/axis2/service/TestService"
namespace="service"
classname=开发者_JS百科"TestService">
<classpath refid="compiled.class.path"/>
<mapping namespace="TestService" package="pkg"/>
</axis-java2wsdl>
</target>
here is my file structure:
prj->bin->pkg->TestService.class/////////// prj->src->pkg->TestService.java/////////// prj->build.xml
I get java.lang.ClassNotFoundException: TestService.
Can anybody tell me how to fix it? Thanks so much. !!!!!!!!!!!!!
Is TestService in a package called "pkg", or is it in the default package (i.e., no package)? If it's in a package called "pkg", you want to define your "compiled.class.path" like:
<path id='compiled.class.path'>
<fileset dir='./bin'>
<include name='**/*.class' />
</fileset>
</path>
精彩评论