windows - 如何为 Windows 编写 wsgen 脚本

标签 windows soap wsgen

我正在研究 Build a SOAP Server with GAE .
在文章中,它包含...

Run wsgen on the annoted class. This tool is now included in the JDK. My JDK includes the version from JAX-WS RI 2.1.6. (You can discover the version by typing wsgen -version.) Because wsgen has several command-line arguments, I have written a Linux shell script called runwsgen.sh to execute it. If you are not using Linux, you will have to translate this script to your OS scripting language. Place the following script in the root directory of the project (i.e. the parent directory of war and src) and execute it from there.

运行wsgen.sh

class=com.example.Greeter
clpth='./war/WEB-INF/classes'
resourcedir='./war'
outsourcedir='./src'
outdir='./war/WEB-INF/classes'
wsgen -cp "$clpth" -wsdl -keep -r "$resourcedir" -d "$outdir" -s "$outsourcedir"  $class

我的问题是如何将它翻译成 Windows 脚本。
感谢您的任何建议。

最佳答案

这可能是一个非常晚的答案,但希望它对其他人有用。你最好在运行这个脚本之前构建你的项目。

set class=com.example.Greeter
set clpth=./war/WEB-INF/classes
set resourcedir=./war
set outsourcedir=./src
set outdir=./war/WEB-INF/classes
wsgen -cp "%clpth%" -wsdl -keep -r "%resourcedir%" -d "%outdir%" -s "%outsourcedir%"  %class%

关于windows - 如何为 Windows 编写 wsgen 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6267024/

相关文章:

c# - 在 WCF 服务中向对象添加属性会破坏客户端

java - wsgen ant 任务忽略@webMethod(exclude=true) 注解

java - wsgen 使用 @WebMethod 生成 WSDL 但忽略 @WebParam

windows - .bashrc/.bash_profile 文件为何或如何适用于 Windows

Java 8 Update 60 减少可用堆内存

ruby - 如何使用 Savon 将属性添加到 header 标签?

windows - 为什么Windows在新的x64进程中使用RCX、RDX作为指针,与新创建的32位进程中的EAX、EBX不同?

windows - Cordova Visual Studio,在 Windows 平板电脑上安装 appx

php - SoapClient 不发送参数