Sun Java System Application Server Platform Edition 9 Reference Manual
  Search only this book

wsimport(1M)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | BINDING FILES | EXAMPLES | SEE ALSO

NAME

    wsimport– generates JAX-WS portable artifacts for a given WSDL file

SYNOPSIS

    wsimportwsdl_file [options]

DESCRIPTION

    The wsimport command generates JAX-WS portable artifacts, such as 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 JAX-B 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.

    Invoking the wsimport command without specifying any arguments outputs the usage information.

OPTIONS

    -b directory

    external JAX-WS or JAX-B binding files. To specify multiple binding files, use multiple -b options.

    -catalog

    specifies a catalog file to resolve external entity references. This option supports TR9401, XCatalog, and OASIS XML Catalog formats.

    -d directory

    where to place the generated output files.

    -extension

    allows vendor extensions for functionality not included in the JAX-WS specification. Use of extensions may result in applications that are not portable or may not interoperate with other web service implementations.

    -help

    prints usage information.

    -httpproxy:host:port

    specifies an HTTP proxy server; defaults to port 8080.

    -keep

    keeps the generated files.

    -p

    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.

    -s directory

    directory for the generated source files.

    -verbose

    output messages about what the compiler is doing.

    -version

    prints version information.

    -wsdllocation URI

    The value of the @WebService.wsdlLocation and @WebServiceClient.wsdlLocation elements in the generated service endpoint interface and Service interface. It should be set to the URI of the web service WSDL file.

BINDING FILES

    Multiple JAX-WS and JAX-B binding files can be specified using -b option and they can be used to 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.

EXAMPLES


    Example 1 Using wsimport to generate client-side artifacts


    wsimport -d outputdir -b custom.xml AddNumbers.wsdl

    Where client side artifacts are generated in the outputdir directory for running the service as defined in the AddNumbers.wsdl file using binding customization as defined in custom.xml.



    Example 2 Using wsimport to generate server-side artifacts


    wsimport -d outputdir -s sourcedir -keep -b ../etc/custom.xml AddNumbers.wsdl

    Where portable server-side artifacts are generated and preserved in the outputdir directory, Java programming language source files are generated and preserved in the sourcedir directory, and binding customization is defined in ../etc/custom.xml based on the AddNumbers.wsdl file.


SEE ALSO

Java EE 5  Last Revised 20 March 2006

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | BINDING FILES | EXAMPLES | SEE ALSO