1wsgen(1) Java Web Services Tools wsgen(1)
2
3
4
6 wsgen - Reads a web service endpoint implementation (SEI) class and
7 generates all of the required artifacts for web service deployment, and
8 invocation.
9
11 wsgen [ options ] SEI
12
13
14 options
15 The command-line options. See Options.
16
17 SEI The web service endpoint implementation class (SEI) to be read.
18
20 The wsgen command generates JAX-WS portable artifacts used in JAX-WS
21 web services. The tool reads a web service endpoint class and generates
22 all the required artifacts for web service deployment and invocation.
23 JAXWS 2.1.1 RI also provides a wsgen Ant task, see the Tools tab of the
24 JAX-WS (wsgen) page at http://jax-
25 ws.java.net/nonav/2.1.1/docs/wsgenant.html
26
27 To start the wsgen command, do the following:
28
29 export JAXWS_HOME=/pathto/jaxws-ri
30 $JAXWS_HOME/bin/wsgen.sh -help
31
32
34 -classpath path
35 The location of the input class files.
36
37 -cp path
38 The location of the input class files.
39
40 -d directory
41 The location for where to place generated output files.
42
43 -extension
44 Allow vendor extensions. Use of extensions can result in
45 applications that are not portable or that do not work with
46 other implementations.
47
48 -help
49 Displays a help message about the wsgen command.
50
51 -keep
52 Keeps the generated files.
53
54 -r directory
55 Uses this option with the -wsdl option to specify where to place
56 generated resource files such as WSDLs.
57
58 -s directory
59 The location for where to place generated source files.
60
61 -verbose
62 Displays compiler messages.
63
64 -version
65 Prints release information.
66
67 -wsdl [ :protocol ]
68 An optional command that generates a WSDL file to review before
69 endpoint deployment. The WSDL files contains a machine-readable
70 description of how the service can be called, what parameters it
71 expects, and what data structures it returns.
72
73 By default the wsgen command does not generate a WSDL file. The
74 protocol value is optional and is used to specify what protocol
75 should be used for the WSDL binding (wsdl:binding). Valid
76 protocols are soap1.1 and Xsoap1.2. The default is soap1.1. The
77 Xsoap1.2 protocol is not standard and can only be used with the
78 -extension option.
79
80 -servicename name
81 Used only with the -wsdl option to specify a particular WSDL
82 service (wsdl:service) name to be generated in the WSDL, for
83 example: -servicename "{http://mynamespace/}MyService".
84
85 -portname name
86 Used only with the -wsdl option to specify a particular WSDL
87 port (wsdl:port) name to be generated in the WSDL, for example:
88 -portname "{http://mynamespace/}MyPort".
89
91 The following example generates the wrapper classes for StockService
92 with @WebService annotations inside stock directory.
93
94 wsgen -d stock -cp myclasspath stock.StockService
95
96 The following example generates a SOAP 1.1 WSDL and schema for the
97 stock.StockService class with @WebService annotations.
98
99 wsgen -wsdl -d stock -cp myclasspath stock.StockService
100
101 The following example generates a SOAP 1.2 WSDL.
102
103 wsgen -wsdl:Xsoap1.2 -d stock -cp myclasspath stock.StockService
104
105 Note: You do not have to generate WSDL at development time because the
106 JAXWS run time environment generates a WSDL for you when you deploy
107 your service.
108
110 · wsimport(1)
111
112 · The Tools tab of the JAX-WS (wsgen) page http://jax-
113 ws.java.net/nonav/2.1.1/docs/wsgenant.html
114
115
116
117JDK 8 21 November 2013 wsgen(1)