如何获取此Ant文件以在./src目录中生成我的存根而不是目标“generate-service-stub”的根目录?
我的目录结构如下所示:
我的WSDL中定义的命名空间是“http://www.example.org/SimpleService/”。所以在构建之后,目录结构如下所示:
- My Project/
- build.xml
- src/
- org/ <-- notice how this falls outside of the src/ directory
- example
- www
- SimpleService
- *.java
- *.wsdd
但我希望它看起来像这样:
- My Project/
- build.xml
- src/
- org/ <-- notice how this falls within the src/ directory
- example
- www
- SimpleService
- *.java
- *.wsdd
这是我的build.xml文件:
<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>
或者它的工作方式实际上是首选的,这样我就不会无意中覆盖我的* SOAPImpl.java文件?
答案 0 :(得分:1)
axis-wsdl2java
Ant task有一个属性output
来控制目的地。所以它应该是这样的:
<axis-wsdl2java serverside="true" url="SimpleService.wsdl" output="src" />