Generates JAX-WS portable artifacts for a given WSDL file. Portable artifacts include service endpoint interfaces (SEIs), services, exception classes mapped from the wsdl:fault and soap:headerfault tags, asynchronous response beans derived from the wsdl:message tag, and JAXB generated value types. After generation, these artifacts can be packaged in a WAR file with the WSDL and schema documents along with the endpoint implementation and then deployed.
The following table describes attributes for the wsimport task.
Table 3–14 The wsimport Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the name of the WSDL file. |
|
current directory |
(optional) Specifies where to place the output generated classes. |
|
current directory |
(optional) Specifies where to place generated source files. Used only if the keep attribute is set to true. |
|
false |
(optional) If true, keeps generated files. |
|
false |
(optional) If true, outputs compiler messages. |
|
none |
(optional) Specifies external JAX-WS or JAXB binding files. JAX-WS and JAXB binding files can customize things like package names and bean names. More information on JAX-WS and JAXB binding files can be found in the customization documentation included with this release. |
|
false |
(optional) If true, allows vendor extensions not in the specification. Use of extensions may result in applications that are not portable and may not interoperate with other implementations. |
|
none |
(optional) Specifies the value of @WebService.wsdlLocation and @WebServiceClient.wsdlLocation annotation elements for the generated SEI and Service interface. This should be set to the URI of the web service WSDL file. |
|
none |
(optional) Specifies the catalog file to resolve external entity references. Supported formats are TR9401, XCatalog, and OASIS XML Catalog. Additionally, the Ant xmlcatalog type can be used to resolve entities. |
|
none |
(optional) Specifies the target package, overriding any WSDL and schema binding customization for package name, and the default package name algorithm defined in the JAX-WS specification. |
The following example generates client-side artifacts for AddNumbers.wsdl and stores .class files in the ${build.classes.home} directory using the custom.xml customization file.
<wsimport destdir="${build.classes.home}" wsdl="AddNumbers.wsdl" binding="custom.xml"> </wsimport>