<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
<!--ArborText, Inc., 1988-1999, v.4002-->
<!ENTITY metainfo SYSTEM "metainfo.sgm">
<!ENTITY Date "22 Dec 2004">
<!ENTITY SectDesc "User Commands">
<!ENTITY Software "J2EE SDK 1.4">
<!ENTITY arch "generic">
<!ENTITY copyright "Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved">
<!ENTITY % commonents SYSTEM "smancommon.ent">
%commonents;
<!ENTITY % booktitles SYSTEM "booktitles.ent">
%booktitles;
<!ENTITY Dash "&ndash;">
]>
<?Pub UDT _bookmark _target>
<?Pub Inc>
<refentry id="wsimport-1m">
<refmeta><refentrytitle>wsimport</refentrytitle><manvolnum>1M</manvolnum>&metainfo;
</refmeta>
<refnamediv><indexterm><primary sortas="wscompile">ws &mdash; generates stubs,
ties, serializers, and WSDL files used in JAX-RPC clients and services</primary>
</indexterm><indexterm><primary sortas=" generates stubs, ties, serializers, and WSDL files used in JAX-RPC clients and services">
generates stubs, ties, serializers, and WSDL files used in JAX-RPC clients
and services &mdash; wscompile</primary></indexterm><refname>wsimport</refname>
<refpurpose>generates JAX-WS portable artifacts for a given WSDL file</refpurpose>
</refnamediv>
<refsynopsisdiv><title>&synp-tt;</title>
<cmdsynopsis><command>wsimport</command><arg><replaceable>options</replaceable></arg>
<command><replaceable>wsdl_file</replaceable></command>
</cmdsynopsis></refsynopsisdiv>
<refsect1><title>&desc-tt;</title>
<para>The <command>wsimport</command> command generates JAX-WS portable artifacts,
such as service endpoint interfaces (SEIs), services, exception classes mapped
from the <literal>wsdl:fault</literal> and <literal>soap:headerfault</literal>
tags, asynchronous response beans derived from the <literal>wsdl:message</literal>
tag, and JAX-B generated value types.</para>
<para>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.</para>
<para>Invoking the <command>wsimport</command> command without specifying
any arguments outputs the usage information.</para>
</refsect1>
<refsect1><title>&opts-tt;</title>
<variablelist termlength="medium"><?Pub Caret>
<varlistentry><term><option>b</option> <replaceable>directory</replaceable></term>
<listitem><para>external JAX-WS or JAX-B binding files. To specify multiple
binding files, use multiple <option>b</option> options.</para>
</listitem></varlistentry>
<varlistentry><term><option>catalog</option></term><listitem><para>specifies
a catalog file to resolve external entity references. This option supports
TR9401, XCatalog, and OASIS XML Catalog formats.</para>
</listitem></varlistentry>
<varlistentry><term><option>d <replaceable>directory</replaceable> </option></term>
<listitem><para>where to place the generated output files.</para>
</listitem></varlistentry>
<varlistentry><term><option>extension</option></term><listitem><para>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.</para>
</listitem></varlistentry>
<varlistentry><term><option>help </option></term><listitem><para>prints usage
information.</para>
</listitem></varlistentry>
<varlistentry><term><option>httpproxy:<replaceable>host:port</replaceable> 
</option></term><listitem><para>specifies an HTTP proxy server; defaults to
port 8080.</para>
</listitem></varlistentry>
<varlistentry><term><option>keep </option></term><listitem><para>keeps the
generated files.</para>
</listitem></varlistentry>
<varlistentry><term><option>p</option></term><listitem><para>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.
</para>
</listitem></varlistentry>
<varlistentry><term><option>s <replaceable>directory</replaceable> </option></term>
<listitem><para>directory for the generated source files.</para>
</listitem></varlistentry>
<varlistentry><term><option>verbose </option></term><listitem><para>output
messages about what the compiler is doing.</para>
</listitem></varlistentry>
<varlistentry><term><option>version </option></term><listitem><para>prints
version information.</para>
</listitem></varlistentry>
<varlistentry><term><option>wsdllocation <replaceable>URI</replaceable></option></term>
<listitem><para>The value of the <literal>@WebService.wsdlLocation</literal>
and <literal>@WebServiceClient.wsdlLocation</literal> elements in the generated
service endpoint interface and <literal>Service</literal> interface. It should
be set to the URI of the web service WSDL file.</para>
</listitem></varlistentry>
</variablelist></refsect1>
<refsect1><title>BINDING FILES</title>
<para>Multiple JAX-WS and JAX-B binding files can be specified using <option>
b</option> 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.</para>
</refsect1>
<refsect1><title>&exam-tt;</title>
<example>
<title>Using <command>wsimport</command> to generate client-side artifacts
</title>
<screen>wsimport -d outputdir -b custom.xml AddNumbers.wsdl</screen>
<para>Where client side artifacts are generated in the <filename>outputdir
</filename> directory for running the service as defined in the <filename>
AddNumbers.wsdl</filename> file using binding customization as defined in <filename>
custom.xml</filename>.</para>
</example>
<example>
<title>Using <command>wsimport</command> to generate server-side artifacts
</title>
<screen>wsimport -d outputdir -s sourcedir -keep -b ../etc/custom.xml AddNumbers.wsdl
</screen>
<para>Where portable server-side artifacts are generated and preserved in
the <filename>outputdir</filename> directory, Java programming language source
files are generated and preserved in the <filename>sourcedir</filename> directory,
and binding customization is defined in <filename>../etc/custom.xml</filename>
based on the <filename>AddNumbers.wsdl</filename> file. </para>
</example>
</refsect1>
<refsect1><title>&also-tt;</title>
<para><link linkend="wsgen-1m"><citerefentry><refentrytitle>wsgen</refentrytitle>
<manvolnum>1M</manvolnum></citerefentry></link></para>
</refsect1>
</refentry>
<?Pub *0000006481>
