2.2.9 wsimport
Generates JAX-WS portable artifacts.
Synopsis
wsimport [OPTION]... <WSDL> OPTION: [-d directory] [-b path] [-B jaxbOption] [-catalog catalogfile] [-extension={false|true}] [-help] [-httpproxy:host:port] [-keep={false|true}] [-p pkg] [-s directory] [-encoding encoding] [-verbose={false|true}] [-version] [-fullversion] [-clientjar jarfile] [-wsdllocation location] [-target version] [-quiet={false|true}] [-XadditionalHeaders={false|true}] [-Xauthfile authfile] [-Xdebug={false|true}] [-XdisableAuthenticator={false|true}] [-Xno-addressing-databinding={false|true}] [-Xnocompile={false|true}] [-XdisableSSLHostnameVerification={false|true}]
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The wsimport command generates JAX-WS portable artifacts, such as:
-
Service Endpoint Interface (SEI)
-
Service
-
Exception class mapped from wsdl:fault (if any)
-
Async Response Bean derived from response wsdl:message (if any)
-
JAXB generated value types (mapped java classes from schema types)
These artifacts can be packaged in a WAR file with the WSDL and schema documents along with the endpoint implementation to be deployed.
Execution permission
Superuser
Files
-
This command takes the WSDL file as input.
-
This command generates JAX-WS portable artifacts described in "Function".
-
For -b option this command takes binding files/XML schema as input.
Arguments
- -d directory
-
Specifies where to place the generated output files.
Type: String
The following values can be specified:
-
Name of the directory
Default value: N/A
-
- -b path
-
Specifies the external JAX-WS or JAXB binding files or additional schema files (Each <file> must have its own -b).
Type: String
The following values can be specified:
-
Name of the binding file with path
Default value: N/A
-
- -B jaxbOption
-
Pass this option to the JAXB schema compiler.
Type: String
The following values can be specified:
-
Name of the JAXB option
Default value: N/A
-
- -catalog catalogfile
-
Specifies the catalog file to resolve external entity references. It supports TR9401, XCatalog, and OASIS XML Catalog formats.
Type: String
The following values can be specified:
-
Path to the catalog file
Default value: N/A
-
- -extension={false|true}
-
Allows 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.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- -help
-
Displays help.
- -httpproxy:host:port
-
Specifies an HTTP proxy server (port defaults to 8080).
Type: Integer
The following values can be specified:
-
1 to 65535
Default value: port defaults to 8080
-
- -keep={false|true}
-
Stores the generated source code files. It is enabled when the -s option is provided.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- -p pkg
-
Specifies a target package through this command-line option. Overrides any wsdl and schema binding customization for the package name and the default package name algorithm defined in the specification.
Type: String
The following values can be specified:
-
Name of the target package
Default value: WSDL/Schema target-Namespace to package mapping as defined by the JAXB 2.1 spec.
-
- -s directory
-
Specifies where to place the generated source code files. -keep is turned on with this option.
Type: String
The following values can be specified:
-
Directory path to place output files
Default value: Current working directory
-
- -encoding encoding
-
Sets the encoding name for generated sources, such as EUC-JP or UTF-8. If -encoding is not specified, the platform default encoding is used.
Type: String
The following values can be specified:
-
UTF-8
-
EUC-JP
Default value: platform default encoding
-
- -verbose={false|true}
-
Outputs messages about what the compiler is doing.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- -version
-
Prints the version information.
- -fullversion
-
Prints the full version information.
- -clientjar jarfile
-
Creates the jar file of the generated artifacts along with the WSDL metadata required for invoking the Web service.
Type: String
The following values can be specified:
-
Name of the jar to be created
Default value: N/A
-
- -wsdllocation location
-
Specifies the @WebServiceClient.wsdlLocation value.
Type: String
The following values can be specified:
-
Mention the location
Default value: Defaults to the wsdl URL passed to wsdl attribute
-
- -target version
-
Generates the code as per the given JAX-WS specification version. For example, -target 2.0 generates compliant code for JAX-WS 2.0 spec. The default value is 2.2.
Type: Integer
The following values can be specified:
-
Till JAX-WS latest version (For example: 2.2.8)
Default value: 2.2
-
- -quiet={false|true}
-
Suppresses the wsimport output.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- -XadditionalHeaders={false|true}
-
Maps the headers (that are not bound to request or response message) to Java method parameters.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- -Xauthfile authfile
-
Specifies the file to carry authorization information in the format http://username:password@example.org/stock?wsdl. The asterisk character (*) can be used to match multiple URL patterns. The default value is $HOME/.metro/auth.
Type: String
The following values can be specified:
-
URL to file carrying authorization information
Default value: Defaults to $HOME/.metro/auth.
-
- -Xdebug={false|true}
-
Prints the debug information.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- -XdisableAuthenticator={false|true}
-
Disables the Authenticator used by JAX-WS RI. -Xauthfile option will be ignored if -XdisableAuthenticator is set.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- -Xno-addressing-databinding={false|true}
-
Enables binding of W3C EndpointReference-Type to Java.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- -Xnocompile={false|true}
-
Does not compile the generated Java files.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- -XdisableSSLHostnameVerification={false|true}
-
Disables the SSL Hostname verification while fetching the wsdls.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
Examples
wsimport -p stockquote http://stockquote.xyz/quote?wsdl
Exit Status
Exit Status |
Explanation |
---|---|
0 |
subcommand executed successfully. |
1 |
error in executing the subcommand. |