开发者

How to write a wsgen script for Windows

开发者 https://www.devze.com 2023-03-11 10:47 出处:网络
I\'m working on Build a SOAP Server with GAE. In the article, it contains... Run wsgen on the annoted class. This

I'm working on Build a SOAP Server with GAE.

In the article, it contains...

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 o开发者_如何学编程f war and src) and execute it from there.

runwsgen.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

My problem is how could I translate it to Windows script.

Thanks for any advice.


this may comes as really late answer, but hopefully it will be useful for other people out there. you'd better build your project before run this script.

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%


Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号