/
tools-wsimport.xml
362 lines (277 loc) · 13.5 KB
/
tools-wsimport.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Distribution License v. 1.0, which is available at
http://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: BSD-3-Clause
-->
<!DOCTYPE book [
<!ENTITY % ents SYSTEM "docbook.ent">
%ents;
]>
<section version="5.0" xml:id="tools-wsimport" xml:lang="en"
xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:ns5="http://www.w3.org/2000/svg"
xmlns:ns3="http://www.w3.org/1999/xhtml"
xmlns:ns="http://docbook.org/ns/docbook"
xmlns:m="http://www.w3.org/1998/Math/MathML">
<title><command>wsimport</command></title>
<section xml:id="wsimport-overview">
<title><command>wsimport</command> Overview</title>
<para>The <command>wsimport</command> tool generates &ws.spec.name; portable
artifacts, such as:</para>
<itemizedlist>
<listitem>
<para>Service Endpoint Interface (SEI)</para>
</listitem>
<listitem>
<para>Service</para>
</listitem>
<listitem>
<para>Exception class mapped from
<literal>wsdl:fault</literal> (if any)</para>
</listitem>
<listitem>
<para>Async Reponse Bean derived from response
<literal>wsdl:message</literal> (if any)</para>
</listitem>
<listitem>
<para>&binding.spec.name; generated value types (mapped java classes from
schema types)</para>
</listitem>
</itemizedlist>
<para>These artifacts can be packaged in a WAR file with the WSDL and
schema documents along with the endpoint implementation to be
deployed. &ws.impl.name.full; also provides a <xref
linkend="tools-wsimport-ant-task" xrefstyle="select:title" />.</para>
</section>
<section xml:id="launching-wsimport">
<title>Launching <command>wsimport</command></title>
<itemizedlist>
<listitem>
<para><emphasis role="bold">Solaris/Linux</emphasis>
<itemizedlist>
<listitem>
<programlisting>&jax-ws.home;<![CDATA[/bin/wsimport.sh -help]]></programlisting>
</listitem>
</itemizedlist></para>
</listitem>
<listitem>
<para><emphasis role="bold">Windows</emphasis> <itemizedlist>
<listitem>
<programlisting>&jax-ws.home;<![CDATA[\bin\wsimport.bat -help]]></programlisting>
</listitem>
</itemizedlist></para>
</listitem>
</itemizedlist>
</section>
<section xml:id="wsimport-syntax">
<title><command>wsimport</command> Syntax</title>
<cmdsynopsis>
<command>wsimport</command>
<group choice="plain" rep="repeat">
<arg choice="opt">OPTION</arg>
</group>
<arg choice="req" rep="norepeat">WSDL</arg>
</cmdsynopsis>
<para>The following table lists the <command>wsimport</command>
options:</para>
<informaltable frame="all">
<tgroup cols="2" colsep="1" rowsep="1">
<thead>
<row>
<entry>Option</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>-d <directory></literal></entry>
<entry>Specify where to place generated output
files.</entry>
</row>
<row>
<entry><literal>-classpath <path></literal></entry>
<entry>Specify where to find user class files
and wsimport extensions.</entry>
</row>
<row>
<entry><literal>-cp <path></literal></entry>
<entry>Specify where to find user class files
and wsimport extensions.</entry>
</row>
<row>
<entry><literal>-b <path></literal></entry>
<entry>Specify external &ws.spec.name; or &binding.spec.name; binding files
or additional schema files (Each
<literal><file></literal> must have its own
<option>-b</option>).</entry>
</row>
<row>
<entry><literal>-B
<jaxbOption></literal></entry>
<entry>Pass this option to &binding.spec.name; schema
compiler.</entry>
</row>
<row>
<entry><literal>-catalog</literal></entry>
<entry>Specify catalog file to resolve external entity
references, it supports TR9401, XCatalog, and OASIS
XML Catalog format. Please read the documentation of
<xref linkend="users-guide-catalog"
xrefstyle="select:title" /> and see catalog
sample.</entry>
</row>
<row>
<entry><literal>-disableXmlSecurity</literal></entry>
<entry>disables XML security features when parsing XML documents.</entry>
</row>
<row>
<entry><literal>-extension</literal></entry>
<entry>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.</entry>
</row>
<row>
<entry><literal>-help</literal></entry>
<entry>Display help.</entry>
</row>
<row>
<entry><literal>-httpproxy:<host>:<port></literal></entry>
<entry>Specify an HTTP proxy server (port defaults to
8080).</entry>
</row>
<row>
<entry><literal>-J<javacOption></literal></entry>
<entry>Pass this option to Javac compiler. Note: use '='
instead of space as a delimiter between option name and
its value.</entry>
</row>
<row>
<entry><literal>-keep</literal></entry>
<entry>Keep generated source code files. It is enabled
when <option>-s</option> option.</entry>
</row>
<row>
<entry><literal>-p <pkg></literal></entry>
<entry>Specifying a target package via this
command-line option, overrides any wsdl and schema
binding customization for package name and the default
package name algorithm defined in the
specification.</entry>
</row>
<row>
<entry><literal>-s <directory></literal></entry>
<entry>Specify where to place generated source code
files. keep is turned on with this option.</entry>
</row>
<row>
<entry><literal>-encoding
<encoding></literal></entry>
<entry>Set the encoding name for generated sources,
such as EUC-JP or UTF-8. If
<literal>-encoding</literal> is not specified, the
platform default encoding is used.</entry>
</row>
<row>
<entry><literal>-verbose</literal></entry>
<entry>Output messages about what the compiler is
doing.</entry>
</row>
<row>
<entry><literal>-version</literal></entry>
<entry>Print version information.</entry>
</row>
<row>
<entry><literal>-fullversion</literal></entry>
<entry>Print full version information.</entry>
</row>
<row>
<entry><literal>-clientjar
<jarfile></literal></entry>
<entry>Creates the jar file of the generated artifacts
along with the WSDL metadata required for invoking the
web service.</entry>
</row>
<row>
<entry><literal>-wsdllocation
<location></literal></entry>
<entry><literal>@WebServiceClient.wsdlLocation</literal>
value.</entry>
</row>
<row>
<entry><literal>-target
<version></literal></entry>
<entry>Generate code as per the given &ws.spec.name;
specification version. For example, "<literal>-target
2.0</literal>" generates compliant code for &ws.spec.name; 2.0
spec. Default value is 2.2.</entry>
</row>
<row>
<entry><literal>-quiet</literal></entry>
<entry>Suppress <command>wsimport</command>
output.</entry>
</row>
<row>
<entry><literal>-XadditionalHeaders</literal></entry>
<entry>Map the headers not bound to request or
response message to Java method parameters.</entry>
</row>
<row>
<entry><literal>-Xauthfile</literal></entry>
<entry>File to carry authorization information in the
format
<uri>http://username:password@example.org/stock?wsdl</uri>.
The asterisk character ("*") can be used to match
multiple URL patterns.
Default value is
<filename>$HOME/.metro/auth</filename></entry>
</row>
<row>
<entry><literal>-Xdebug</literal></entry>
<entry>Print debug information.</entry>
</row>
<row>
<entry><literal>-XdisableAuthenticator</literal></entry>
<entry>Disables Authenticator used by &ws.impl.name;,
<literal>-Xauthfile</literal> option will be ignored if
<literal>-XdisableAuthenticator</literal> is set.</entry>
</row>
<row>
<entry><literal>-Xno-addressing-databinding</literal></entry>
<entry>Enable binding of W3C
<literal>EndpointReferenceType</literal> to
Java.</entry>
</row>
<row>
<entry><literal>-Xnocompile</literal></entry>
<entry>Do not compile generated Java files.</entry>
</row>
<row>
<entry><literal>-XdisableSSLHostnameVerification</literal></entry>
<entry>Disbales the SSL Hostname verification while
fetching the wsdls.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>Multiple &ws.spec.name; and &binding.spec.name; binding files can be specified using
<option>-b</option> option and they can be used to customize various
things like package names, bean names, etc. More information on &ws.spec.name;
and &binding.spec.name; binding files can be found in the <xref
linkend="users-guide-wsdl-customization"
xrefstyle="select:title" />.</para>
</section>
<section xml:id="wsimport-example">
<title><command>wsimport</command> Example</title>
<informalexample>
<programlisting language="cli"><![CDATA[wsimport -p stockquote http://stockquote.xyz/quote?wsdl]]></programlisting>
</informalexample>
<para>This will generate the Java artifacts and compile them by
importing the <link
xlink:href="http://stockquote.org/quote?wsdl">http://stockquote.xyz/quote?wsdl</link>.</para>
</section>
</section>