Designer 10.7 | webMethods Service Development Help | Building Services | About Service Output Templates | Creating an Output Template
 
Creating an Output Template
You can use Designer to create an output template, or you can create an output template file using an ordinary text editor.
When you create an output template, keep the following points in mind:
*You must give the output template file a name that is unique within the package in which it resides.
*If you want the template to produce output in XML, WML, or HDML, you must include a <meta> tag in the first line of the template’s contents that sets the value of Content Type accordingly (for example, <meta http-equiv="Content-Type" content="text/xml">).
*The default encoding that Integration Server uses to interpret data posted in the resulting browser page is Unicode (UTF-8). If you want to change the encoding to something other than UTF-8, you must insert a <meta> tag that sets the encoding (for example, <meta http-equiv="Content-Type" charset=iso-8859-1">).
*If you specify a file encoding other than UTF-8 in the <meta> tag of your template’s content, the characters that you use in your template (including the data inserted into your template using %VALUE% statements) are limited to those in the character set of the encoding you choose.
*You can reference one output template from within another.
The following procedure describes how to create an output template using Designer.
*To create an output template
1. Lock and open the flow service whose output you want to format using an output template.
2. In the Properties view, in the Name field under Output template, type the name of the file that will contain the output template tags. Alternatively, you can accept the name that Designer suggests.
3. In the Type field, specify the type of the output template file. You can select html or xml from the drop-down list. By default, html is selected.
4. In the Template source field, do the following:
a. Click .
b. On the Template Source dialog, type or paste all literal text exactly as you want it to appear in the service output, including HTML, XML, WML, or HDML content as desired. Then, embed any output template tags where you want the server to execute them at run time. For details about template tags, see Dynamic Server Pages and Output Templates Developer’s Guide.
c. Click Save.
Designer creates the file in the format FolderName_ServiceName.html and stores the file in the IntegrationServer_directory\instances\instance_name\packages\packageName\templates directory.