<!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 EntList brvbar bull cross dash diam diams frac12 frac13 frac14 hellip
 laquo lArr loz mdash nabla ndash para pound rArr raquo sect yen bsol>
<?Pub Inc>
<refentry id="wsdeploy-1m">
<refmeta><refentrytitle>wsdeploy</refentrytitle><manvolnum>1M</manvolnum>&metainfo;
</refmeta>
<refnamediv><indexterm><primary sortas="wsdeploy ">wsdeploy &mdash; reads
a <filename>WAR</filename> file and the <filename>jaxrpc-ri.xml</filename>
file and generates another <filename>WAR</filename> file that is ready for
deployment</primary></indexterm><indexterm><primary sortas=" reads a <filename>WAR</filename> file and the <filename>jaxrpc-ri.xml</filename> file and generates another <filename>WAR</filename> file that is ready for deployment">
 reads a <filename>WAR</filename> file and the <filename>jaxrpc-ri.xml</filename>
file and generates another <filename>WAR</filename> file that is ready for
deployment &mdash; wsdeploy</primary></indexterm><refname>wsdeploy</refname>
<refpurpose>reads a <filename>WAR</filename> file and the <filename>jaxrpc-ri.xml
</filename> file and generates another <filename>WAR</filename> file that
is ready for deployment</refpurpose></refnamediv>
<refsynopsisdiv><title>&synp-tt;</title>
<cmdsynopsis><command>wsdeploy <option>o</option> <replaceable>input_WAR_file
</replaceable> <replaceable>options</replaceable></command>
</cmdsynopsis></refsynopsisdiv>
<refsect1><title>&desc-tt;</title>
<para>Use the <command>wsdeploy</command> command to take a WAR file which
does not have implementation specific server side tie classes to generate
a deployable WAR file that can be deployed on the application server. <command>
wsdeploy</command> internally runs <command>wscompile</command> with the <option>
gen:server</option> option. The <command>wscompile</command> command generates
classes and a WSDL file which <command>wsdeploy</command> includes in the
generated WAR file.</para>
<para>Generally, you don't have to run <command>wsdeploy</command> because
the functions it performs are done automatically when you deploy a WAR with <command>
deploytool</command> or <command>asadmin</command>.</para>
</refsect1>
<refsect1><title>&opts-tt;</title>
<variablelist termlength="medium"><?Pub Caret>
<varlistentry><term><option>classpath <replaceable>path</replaceable></option></term>
<listitem><para>location of the input class files.</para>
</listitem></varlistentry>
<varlistentry><term><option>keep </option></term><listitem><para>keep temporary
files.</para>
</listitem></varlistentry>
<varlistentry><term><option>tmpdir <replaceable>directory</replaceable></option></term>
<listitem><para>use the specified directory as a temporary directory</para>
</listitem></varlistentry>
<varlistentry><term><option>o <replaceable>output WAR file</replaceable> 
</option></term><listitem><para>required; location of the generated WAR file.
This option is required.</para>
</listitem></varlistentry>
<varlistentry><term><option>source </option><replaceable>version</replaceable></term>
<listitem><para>generates code for the specified JAX-RPC SI version. Supported
version are: 1.0.1, 1.0.3, 1.1, 1.1.1, and 1.1.2 (the default).</para>
</listitem></varlistentry>
<varlistentry><term><option>verbose </option></term><listitem><para>outputs
messages about what the compiler is doing.</para>
</listitem></varlistentry>
<varlistentry><term><option>version </option></term><listitem><para>prints
version information.</para>
</listitem></varlistentry>
</variablelist></refsect1>
<refsect1><title>INPUT WAR FILE</title>
<para>The input WAR file for <command>wsdeploy</command> will typically have
the following structure:</para>
<para><literallayout>META-INF/MANIFEST.MF
WEB-INF/classes/hello/HelloIF.class
WEB-INF/classes/hello/HelloImpl.class
WEB-INF/jaxrpc-ri.xml
WEB-INF/web.xml</literallayout></para>
<para>Where: HelloIF is the service endpoint interface, and HelloImpl is the
class thatimplements the interface. The web.xml file is tghe deployment descriptor
of a web component.</para>
</refsect1>
<refsect1><title>jaxrpc-ri.xml FILE</title>
<para>The following is a simple HelloWorld service.</para>
<para><literallayout>&lt;xml version="1.0" encoding="UTF-8"?>
&lt;webServices>
     xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/dd"
     version="1.0"
     targetNamespaceBase="http://com.test/wsdl"
     typeNamespaceBase="http://com.test/types"
     urlPatternBase="/ws">
     &lt;endpoint
          name="MyHello"
          displayName="HelloWorld Service"
          description="A simple web service"
          wsdl="/WEB-INF/&lt;wsdlname>
          interface="hello.HelloIF"
          implementation="hello.HelloImpl"/>
     &lt;endpointMapping
          endpointName="MyHello"
          urlPattern="/hello"/>
&lt;/webServices></literallayout></para>
<para>The <function>webServices</function> element must contain one or more <function>
endpoint</function> elements. The interface and implementation attriutes of <function>
endpoint</function> specify the service's interface and iimplementation class.
The <function>endpointMapping</function> element associates the service port
with the part of the endpoint URL path that follows the <function>urlPatternBase
</function>.</para>
</refsect1>
<refsect1><title>NAMESPACE MAPPINGS</title>
<para>Here is a schema type name example:</para>
<para><literallayout>schemaType="ns1:SampleType"
xmlns:ns1="http://echoservice.org/types"</literallayout></para>
<para>When generating a Java type from a schema type, wscompile gets the classname
from the local part of the schema type name. To specify the package name of
the generated Java classes, you define a mapping between the schema type namespace
and the package name. You define this mapping by adding a &lt;namespaceMappingRegistry>
element to the config.xml file. For example:</para>
<para><literallayout>

&lt;service>
     ...
     &lt;namespaceMappingRegistry>
          &lt;namespaceMapping
          namespace="http://echoservice.org/types"
          packageName="echoservice.org.types"/>
          &lt;/namespaceMappingRegistry>
     .....
&lt;/service></literallayout></para>
<para>You can also map namespaces in the oppisite direction, from schema types
to Java types. In this case, the generated schema types are taken from the
package that the type comes from.</para>
</refsect1>
<refsect1><title>HANDLERS</title>
<para>A handler accesses a SOAP message that represents an RPC request or
response. A handler class must implement the <filename>javax.xml.rpc.handler
</filename> interface. Because it accesses a SOAP message, a handler can manipulate
the message with the APIs of the<function> javax.xml.soap.package</function>.
</para>
<para>A handler chain is a list of handlers. You may specify one handler chain
for the client and one for the server. On the client, you include the <function>
handlerChains</function> element in the <filename>jaxrpc-ri.xml</filename>
file. On the server, you include this element in the <filename>config.xml
</filename> file. Here is an example of the <function>handlerChains</function>
element in the <filename>config.xml</filename>:</para>
<para><literallayout>

&lt;handlerChains>
  &lt;chain runAt="server"
     roles=
       "http://acme.org/auditing
       "http://acme.org/morphing"
       xmlns:ns1="http://foo/foo-1">
     &lt;handler className="acme.MyHandler"
       headers ="ns1:foo ns1:bar"/>
       &lt;property
          name="property" value="xyz"/>
       &lt;/handler>
     &lt;/chain>
&lt;/handlerChains></literallayout></para>
<para>For more information on handlers, see the SOAP message Handlers chapter
of the JAX-PRC specifications.</para>
</refsect1>
<refsect1><title>&also-tt;</title>
<para><link linkend="wscompile-1m"><citerefentry><refentrytitle>wscompile
</refentrytitle><manvolnum>1M</manvolnum></citerefentry></link></para>
</refsect1>
</refentry>
<?Pub *0000008435>
