If client applications will access an operation with messages
that use the HTTP GET or POST (url-encoded) protocol, you can transform
messages that are returned by the Web service. The XSL transformation
changes messages that are tagged according to the default XML schema
to valid XML documents or into non-XML formats.
About this task
When you use the REST-like HTTP GET or POST (url-encoded)
protocol, the input to an operation is a string of parameters. XSL
transformations are not possible with these strings.
The following
table describes the inputs to and outputs from the XSL transformations
that you can configure when input messages use the HTTP GET or POST
(url-encoded) protocol:
Table 1. Inputs to
and outputs from the XSL transformations. |
Input to the XSL transformation |
Output from the XSL transformation |
First XSL transformation |
XSL
transformations are not supported for messages from client applications. |
Second XSL transformation |
Valid XML document that uses the
default XML schema |
Non-XML document or a valid XML document
that uses a custom XML schema |
To configure XSL transformations on input and output messages
that use the HTTP GET or POST (url-encoded) protocol for an operation:
Procedure
- Open the Manage XSL Transformations wizard
by right-clicking the operation and selecting Manage XSL
Transformations.
- Click Generate default to generate
the default XML schema for the output messages. The schema
also contains default information about input messages. However, you
can ignore this information because you will not be transforming input
messages.
- Create an XSL file for the transformation of output messages
to non-XML files or XML files that are tagged according to a custom
XML schema.
- Optional: Specify the mime type for files
that the XSL transformation creates. Use the media-type attribute
of the <xsl:output> tag in the XSL file.
If
you do not specify a mime type, the XSL transformation uses the following
algorithm to determine the mime type:
- If the output of the transformation is an HTML file, the mime
type is set to text/html.
- If the output of the transformation is a text file, the mime type
is set to text/plain.
- If the output of the transformation is an XML file, the mime type
is set to text/xml.
When you are finished, make sure that the XSL file is in a location
that you can browse to from the workbench.
- Open the Manage XSL Transformations wizard
by right-clicking the operation and selecting Manage XSL
Transformations.
- Select the XSL file for the transformation of output messages.
- Click Finish.