使用 Axis 和 Ant 在 ./src 而不是根目录中生成存根
如何让这个 Ant 文件在 ./src 目录而不是目标“generate-service-stub”的根目录中生成我的存根?
我的目录结构如下所示:
- 我的项目/
- build.xml
- src/
我的 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文件?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
axis-wsdl2java
Ant 任务有一个属性output
来控制目的地。所以它应该是这样的:The
axis-wsdl2java
Ant task has an attributeoutput
to control the destination. So it should be something like: