JAX-WS 2.1.1 | Users Guide | Tools | JAXWS RI Extensions | Samples | JAXWS Community |
wsgen
generates JAX-WS portable artifacts used in JAX-WS web services. The tool reads a web service endpoint class and generates all the required artifacts for web service deployment, and invocation.
2. Wsimport Task Attributes
The attributes and elements supported by the Ant task are listed below:
<wsgen sei="..." destdir="directory for generated class files" classpath="classpath" | cp="classpath" resourcedestdir="directory for generated resource files such as WSDLs" sourcedestdir="directory for generated source files" keep="true|false" verbose="true|false" genwsdl="true|false" protocol="soap1.1|Xsoap1.2" servicename="..." portname="..."> extension="true|false" <classpath refid="..."/> </wsgen>
Attribute |
Description |
Command line |
|
Name of the service endpoint implementation class |
SEI |
|
Specify where to place output generated classes |
|
|
Specify where to find input class files |
|
|
Same as
|
|
|
Used only in conjunction with the -wsdl option. Specify where to place generated resource files such as WSDLs |
|
|
Specify where to place generated source files |
|
|
Keep generated files |
|
|
Output messages about what the compiler is doing |
|
|
Specify that a WSDL file should be generated
|
|
|
Used in conjunction with
|
|
|
Used in conjunction with the genwsdl option. Used to specify a particular
|
|
|
Used in conjunction with the genwsdl option. Used to specify a particular
|
|
|
allow vendor extensions (functionality not specified by the specification). Use of extensions may result in applications that are not portable or may not interoperate with other implementations
|
|
The
classpath
attribute is a
path-like structure and can also be set via nested
<classpath>
elements. Before this task can be used, a
<taskdef>
element needs to be added to the project as given below:
<taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen">
<classpath path="jaxws.classpath"/>
</taskdef>
where
jaxws.classpath
is a reference to a
path-like structure, defined elsewhere in the build environment, and contains the list of classes required by the JAX-WS tools.
3. Running on JDK 6
To run on JDK 6 follow these
instructions.
4. Example
<wsgen resourcedestdir="" sei="fromjava.server.AddNumbersImpl"> <classpath refid="compile.classpath"/> </wsgen>