Transforming input messages that use the HTTP POST (text/xml) protocol and output messages

If client applications will access an operation with messages that use the HTTP POST (text/xml) protocol, you can transform those messages to use the XML schema that the workbench generated for the operation. You can optionally transform messages that are returned by the Web service from the default XML schema to valid XML documents or into non-XML formats.

About this task

The following table describes the inputs to and outputs from the XSL transformations that are possible when input messages use the HTTP POST (text/xml) protocol:

Table 1. Inputs to and outputs from the XSL transformations
  Input to the XSL transformation Output from the XSL transformation
First XSL transformation Valid XML document that uses a custom XML schema Valid XML document that uses the default XML schema
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 HTTP POST (text/xml) input messages that access an operation and optionally on output messages:

Procedure

  1. Open the Manage XSL Transformations wizard by right-clicking the operation and selecting Manage XSL Transformations.
  2. Click Generate default to generate the default XML schema for the input messages and the output messages.
  3. Create an XSL file for the transformation of input messages. Make sure that the XSL file is in a location that you can browse to from the workbench.
  4. 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.
    1. 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.
  5. Open the Manage XSL Transformations wizard by right-clicking the operation and selecting Manage XSL Transformations.
  6. Select the XSL file for the transformation of input messages.
  7. If you want to transform output messages, select the XSL file for the transformation of output messages.
  8. Click Finish.

Feedback