<!--Arbortext, Inc., 1988-2007, v.4002-->
<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD SolBook 3.5//EN" [
<!ENTITY options-common SYSTEM "options-common.sgm">
<!ENTITY synopsis-common SYSTEM "synopsis-common.sgm">
<!ENTITY % commonents SYSTEM "common.ent">
%commonents;
]>
<!--Arbortext, Inc., 1988-2007, v.4002-->
<?Pub EntList bull rArr sect>
<refentry id="create-transformation-rule-1">
<!-- @(#)create-transformation-rule.1 1.10 07/07/27 SMI; -->
<refmeta><refentrytitle>create-transformation-rule</refentrytitle><manvolnum>1</manvolnum>
<refmiscinfo class="date">30 Jan 2007</refmiscinfo>
<refmiscinfo class="sectdesc">&man1;</refmiscinfo>
<refmiscinfo class="software">&software;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
<refmiscinfo class="copyright">Copyright (c) 2007, Sun Microsystems, Inc.
All Rights Reserved</refmiscinfo>
</refmeta>
<refnamediv><indexterm><primary>create-transformation-rule</primary></indexterm>
<indexterm><primary>creates transformation rule for a deployed web service</primary>
</indexterm>
<refname>create-transformation-rule</refname><refpurpose>creates transformation
rule for a deployed web service</refpurpose></refnamediv>
<refsynopsisdiv><title></title>
<synopsis><command>create-transformation-rule</command> <option
role="double-dash">webservicename</option> <replaceable>webservice_name </replaceable> 
 <option role="double-dash">rulefilelocation</option> <replaceable>rulefile_location 
</replaceable>
[<option role="double-dash">enabled</option>={<literal>true | false</literal>] [<option
role="double-dash">applyto</option>=<literal>request | response | both </literal>] <replaceable>
transformation-rule-name</replaceable></synopsis>
</refsynopsisdiv>
<refsect1 role="description"><title></title>
<para>Creates an XSLT transformation rule that can be applied to a webservice
operation. The rule can be applied either to a request or to a response. </para>
</refsect1>
<refsect1 role="options"><title></title>
<variablelist termlength="medium">
<varlistentry><term><option role="double-dash">webservicename</option></term>
<listitem><para>name of the deployed web service for which you are creating
a transformation rule</para>
</listitem>
</varlistentry>
<varlistentry><term><option>rulefilelocation</option></term>
<listitem><para>location of the file to do the transformation. Only XSLT files
are allowed. Default location is <replaceable>instance_dir</replaceable><filename>
/generated/xml/</filename><replaceable>application_name or module_name</replaceable>/<replaceable>
XSLTfilename</replaceable></para>
</listitem>
</varlistentry>&options-common;
<varlistentry><term><option role="double-dash">enabled</option></term>
<listitem><para>if set to true, enables the web service endpoint.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">operationname</option></term>
<listitem><para>name of the web service operation</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">applyto</option></term>
<listitem><para>the kind of operation to which the transformation tule has
to be applied. Allowed values are:</para>
<itemizedlist>
<listitem><para><literal>request</literal>, applied to a SOAP request. This
is the default. </para></listitem>
<listitem><para><literal>response</literal>, applied to a web service response.</para>
</listitem>
<listitem><para><literal>both</literal>, applied to all methods in the web
service endpoint.</para></listitem>
</itemizedlist>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="operands"><title></title>
<variablelist termlength="medium">
<varlistentry><term><replaceable>transformation-rule-name</replaceable></term>
<listitem><para>name of the transformation rule being created. </para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="examples"><title></title>
<example><title>To create a transformation rule that applies to both request
and response operations:</title>
<screen><userinput>create-transformation-rule --webservicename jaxrpc-simple#jaxrpc-simple.war#HelloIF 
--enabled=true --applyto=both 
--rulefilelocation /opt/SUNWappserver/generated/xml/res.xslt 
ChangeResponse_Rule</userinput>
Command create-transformation-rule executed successfully</screen>
<para>where, <filename>res.xslt</filename> is the file name that stores the
transformation rule.</para>
<para>and,<filename>jaxrpc-simple#jaxrpc-simple.war#HelloIF</filename> is
the fully qualified name of a web service endpoint.</para>
</example>
</refsect1>
<refsect1 role="exit-status"><title></title>
<variablelist termlength="medium">
<varlistentry><term>0</term>
<listitem><para>command executed successfully</para>
</listitem>
</varlistentry>
<varlistentry><term>1</term>
<listitem><para>error in executing the command</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="see-also"><title></title>
<para><olink targetdoc="asrefman" targetptr="delete-transformation-rule-1">delete-transformation-rule(1)</olink>, <olink targetdoc="asrefman" targetptr="list-transformation-rules-1">list-transformation-rules(1)</olink></para>
</refsect1>
</refentry>
<?Pub *0000005297 0>
