1wsimport(1)                 General Commands Manual                wsimport(1)
2
3
4

NAME

6       wsimport - JAX-WS 2.0 Beta
7

SYNOPSIS

9       wsimport [options] <wsdl>
10
11

DESCRIPTION

13       The wsimport tool generates JAX-WS portable artifacts, such as:
14
15          o Service Endpoint Interface (SEI)
16
17          o Service
18
19          o Exception class mapped from wsdl:fault (if any)
20
21          o Async Reponse Bean derived from response wsdl:message (if any)
22
23          o JAXB generated value types (mapped java classes from schema types)
24
25
26       These  artifacts can be packaged in a WAR file with the WSDL and schema
27       documents along with the endpoint implementation to be deployed.
28
29
30       wsimport tool can be launched using the command line script wsimport.sh
31       (Unix)  or  wsimport.bat(windows). There is also and ant task to import
32       and compile the wsdl, see the details below.
33
34

OPTIONS

36       The following table lists the wsimport options.
37
38
39       Table 1-1 wsimport Options
40
41       Multiple JAX-WS and JAXB binding files can be specified using -b option
42       and  they  can  be used to customize various things like package names,
43       bean names, etc. More information on JAX-WS and JAXB binding files  can
44       be found in the customization documentation.
45
46
47   Ant task
48       An  Ant task for the wsimport tool is provided along with the tool. The
49       attributes and elements supported by the Ant task are listed below:
50
51
52          <wsimport
53             wsdl="..."
54             destdir="directory for generated class files"
55             sourcedestdir="directory for generated source files"
56             keep="true|false"
57             extension="true|false"
58             verbose="true|false"
59             version="true|false"
60             wsdlLocation="..."
61             catalog="catalog file"
62             package="package name"
63             <binding dir="..." includes="..." />
64         </wsimport>
65
66
67       The binding attributes is like a path-like structure @
68       http://ant.apache.org/manual/using.html#path and can also be set via
69       nested <binding> elements, respectively. Before this task can be used,
70       a <taskdef> element needs to be added to the project as given below:
71
72         <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
73             <classpath path="jaxws.classpath"/>
74         </taskdef>
75
76
77       where jaxws.classpath is a reference to a path-like structure @
78       http://ant.apache.org/manual/using.html#path, defined elsewhere in the
79       build environment, and contains the list of classes required by the
80       JAX-WS tools.
81

Examples

83         <wsimport
84             destdir="${build.classes.home}"
85             debug="true"
86             wsdl="AddNumbers.wsdl"
87             binding="custom.xml"/>
88
89
90       The above example generates client-side artifacts for AddNumbers.wsdl,
91       stores .class files in the ${build.classes.home} directory using the
92       custom.xml customization file. The classpath used is xyz.jar and com‐
93       piles with debug information on.
94
95         <wsimport
96             keep="true"
97             sourcedestdir="${source.dir}"
98             destdir="${build.classes.home}"
99             wsdl="AddNumbers.wsdl">
100             <binding dir="${basedir}/etc" includes="custom.xml"/>
101         </wsimport>
102
103
104       The above example generates portable artifacts for AddNumbers.wsdl,
105       stores .java files in the ${source.dir} directory, stores .class files
106       in the ${build.classes.home} directory.
107

Notes

109       Summary of Changed and Removed wsimport ant attributes:
110
111       base replaced by destdir
112
113
114       sourceBase is replaced by sourcedestdir
115
116
117       wsdlFile is replaced by wsdl
118       httpProxy is removed. Use ant's setproxy task instead for proxy config‐
119       uration.
120       version is removed
121
122
123                                  07 Aug 2006                      wsimport(1)
Impressum