NAME¶
wsgen - JAX-WS 2.0 Beta
The wsgen tool generates JAX-WS portable artifacts used in
JAX-WS web services. The tool reads a web service endpoint implementation
class (SEI) and generates all the required artifacts for web service
deployment, and invocation.
SYNOPSIS¶
wsgen [options] <SEI>
OPTIONS¶
The following table lists the wsgen options.
Table 1-1 wsgen Options
0 |
Used only in conjunction with the \-wsdl option. Specify where
to place generated resource files such as WSDLs |
0u |
0 |
Specify where to place generated source files |
0u |
0 |
Output messages about what the compiler is doing |
0u |
0 |
Print version information. Use of this option will ONLY print
version information. Normal processing will not occur. |
0u |
0 |
By default \f2wsgen\fP does not generate a WSDL file.\ This flag
is optional and will cause \f2wsgen\fP to generate a WSDL file and is
usually only used so that the developer can look at the WSDL before the
endpoint is deploy.\ The \f2protocol\fP is optional and is used to specify
what protocol should be used in the \f2wsdl:binding\fP. Valid protocols
include:\ \f2soap1.1\fP and \f2Xsoap1.2\fP.\ The default is
\f2soap1.1\fP.\ \f2Xsoap1.2\fP is not standard and can only be used in
conjunction with the \f2\-extension\fP option. |
0u |
0 |
Used only in conjunction with the \f2\-wsdl\fP option. Used to
specify a particular \f2wsdl:service\fP name to be generated in the WSDL.
Example, \f2\-servicename
"{http://mynamespace/}MyService"\fP |
0u |
0 |
Used only in conjunction with the \f2\-wsdl\fP option. Used to
specify a particular \f2wsdl:port\fP name to be generated in the WSDL.
Example, \f2\-portname "{http://mynamespace/}MyPort"\fP |
0u |
?-classpath <path>????? |
+528u |
-528u |
?-cp <path>????? |
+528u |
-528u |
?-d <directory>????? |
+528u |
-528u |
?-extension????? |
+528u |
-528u |
?-keep???Keep generated files?? |
?-r <directory>????? |
+528u |
-528u |
?-s <directory>????? |
+528u |
-528u |
?-verbose????? |
+528u |
-528u |
?-version????? |
+528u |
-528u |
?????? |
+0u |
-0u |
+528u |
-528u |
?-servicename <name>????? |
+528u |
-528u |
?-portname <name>????? |
+528u |
-528u |
0u |
Ant task¶
An Ant task for the wsgen tool is provided along with the
tool. 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>
0 |
Specify where to place generated source
files |
0u |
0 |
Output messages about what the compiler is
doing |
0u |
0 |
Specify that a WSDL file should be
generated |
0u |
0 |
Used in conjunction with \f2genwsdl\fP to
specify the protocol to use in the \f2wsdl:binding\fP.\ Value values are
\f2"soap1.1"\fP or \f2"Xsoap1.2"\fP, default is
\f2"soap1.1".\fP\f2"Xsoap1.2"\fP is not standard and
can only be used in conjunction with the \-extensions option |
0u |
0 |
Used in conjunction with the genwsdl option.
Used to specify a particular \f2wsdl:service\fP name for the generated
WSDL.Example,
\f2servicename="{http://mynamespace/}MyService"\fP |
0u |
0 |
Used in conjunction with the genwsdl option.
Used to specify a particular \f2wsdl:portmame\fP name for the generated
WSDL. Example,
\f2portname="{http://mynamespace/}MyPort"\fP |
0u |
0 |
allow vendor extentions (funcionality not
specified by the specification). Use of extensions may result in
applications that are not portable or may not interoperate with other
implementations |
0u |
?Attribute???Description???Command
line??
|
?sei??????SEI??
|
+432u |
-432u |
?destdir??????-d??
|
+432u |
-432u |
?classpath??????-classpath??
|
+432u |
-432u |
?cp???Same as
-classpath???-cp??
|
?resourcedestdir??????-r??
|
+432u |
-432u |
?sourcedestdir??????-s??
|
+432u |
-432u |
?keep???Keep generated
files???-keep??
|
?verbose??????-verbose??
|
+432u |
-432u |
???????-wsdl??
|
+432u |
-432u |
????????? |
+432u |
-432u |
+984u |
-984u |
???????-servicename??
|
+432u |
-432u |
???????-servicename??
|
+432u |
-432u |
???????-extension??
|
+432u |
-432u |
0u |
The classpath attribute is a
path-like structure @
http://ant.apache.org/manual/using.html#path 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 @
http://ant.apache.org/manual/using.html#path, defined elsewhere in the build
environment, and contains the list of classes required by the JAX-WS
tools.
Example¶
<wsgen
resourcedestdir="${wsdl.dir}"
sei="fromjava.server.AddNumbersImpl">
<classpath refid="compile.classpath"/>
</wsgen>