How do I get this Ant file to generate my stubs in the ./src directory instead of the root directory for the target "generate-service-stub"?
My directory structure looks like this:
- My Project/
- build.xml
- src/
The namespace defined in my WSDL is "http://www.example.org/SimpleService/". So after the build, the directory structure looks like this:
- My Project/
- build.xml
- src/
- org/ <-- notice how this falls outside of the src/ directory
- example
- www
- SimpleService
- *.java
- *.wsdd
But I want it to look like this:
- My Project/
- build.xml
- src/
- org/ <-- notice how this falls within the src/ directory
- example
- www
- SimpleService
- *.java
- *.wsdd
Here's my build.xml file:
<project name="SimpleService">
<property name="axis.home" value="C:/axis-1_4" />
<property name="javamail.home" value="C:/javamail-1.4.4" />
<property name="jsf.home" value="C:/jaf-1.1" />
<path id="axis.classpath">
<fileset dir="${axis.home}/lib">
<include name="**/*.jar" /开发者_高级运维>
</fileset>
<fileset dir="${javamail.home}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${jsf.home}">
<include name="**/*.jar" />
</fileset>
</path>
<taskdef resource="axis-tasks.properties" classpathref="axis.classpath" />
<target name="generate-service-stub">
<axis-wsdl2java serverside="true" url="SimpleService.wsdl">
</axis-wsdl2java>
</target>
</project>
Or is the way it's working actually preferred, so that I don't inadvertently overwrite my *SOAPImpl.java file?
The axis-wsdl2java
Ant task has an attribute output
to control the destination. So it should be something like:
<axis-wsdl2java serverside="true" url="SimpleService.wsdl" output="src" />
精彩评论