wsgen vs java2wsdl
What is the difference between wsgen and java2wsdl 开发者_运维问答tools ?
The primary purpose of wsgen in the JAX-WS RI was to generate the artifacts that the runtime needed that were not supplied by the user. Generally, that meant the wrapper beans and the fault beans. The generation of a wsdl was mostly just considered an extra optional but interesting side affect.
With the more modern JAX-WS runtimes such as CXF and the latest nightly builds of the RI for 2.2, those artifacts are generated by the runtime on demand in the runtime. For example, CXF uses ASM to generate the bean classes in memory at startup. Thus, with the more modern JAX-WS implementations, wsgen is kind of irrelevant and the primary use of a java first tool is to produce wsdl, not wrapper beans. That's pretty much why CXF's tool is named "java2wsdl", not wsgen.
Both have similar task - generate a web service from java classes. wsgen is part of the JAX-WS package by sun, where as java2wsdl belongs to another project (you didn't mention if you are refereing to the Axis one or the CXF one)
精彩评论