|
PurposeThe TemplateTool utility works with
certificate template files. It performs functions you need if you
implement the Web application using Java™ server
pages (JSPs). There are three certificate template files used by PKI Services:
The TemplateTool utility performs the following functions: - validateXML
The validateXML
function validates an XML template file against the XML schema file.
It can optionally convert the XML template file to a text CGI template
file. Use this function after you make changes to your XML schema
file, pkiserv.tmpl, to validate the changes and create
a CGI template file, pkixgen.tmpl, for use by the PKI Services daemon.
- convertCGI
The convertCGI function converts
a text CGI template file to an XML template file. This function can
assist PKI Services administrators
in converting the Web application from the REXX CGI execs to the JSPs.
The conversion process might not convert all tags, so you should always
verify the contents of the resulting XML template file.
- help
The help function prints the format of the utility.
Requirement: You
must have Java V5.0 or higher
installed to run the TemplateTool utility.
Path setupUpdate your PATH and CLASSPATH
environment variables with the appropriate directories before you
run TemplateTool. (Note that you are updating the
environment variables for the user running the utility, not updating
values in the PKI Services environment
variables file, pkiserv.envars.) Once you have updated
these variables, you can run TemplateTool from the
shell script or from Java. Variable name |
You must add … |
---|
PATH |
/install-dir/pkiserv/bin |
|
The directory containing the java command. |
CLASSPATH |
/install-dir/pkiserv/lib/pki_xml.jar |
The default directory for install-dir is /usr/lpp.
FormatTemplateTool -help |
-validateXML [-XMLTemplate XML_template_file]
[-CGITemplate CGI_template_file] |
-convertCGI [-CGITemplate CGI_template_file]
[-XMLTemplate XML_template_file]
To
run the utility from Java: java com.ibm.pki.template.TemplateTool function parameters
To
run the utility from the shell script: TemplateTool function parameters
Parameters- -XMLTemplate XML_template_file
- An XML template file. Specify the name of the XML template file
if it is in the current directory, or the full path name.
For the
validateXML function, this parameter is required. The specified XML
template file is validated against the XML schema file PKIServ.xsd,
which must be in the same directory.
For the convertCGI function,
this parameter is required. The CGI template file specified as input
is converted to an XML template file using the XML schema file PKIServ.xsd,
and output to the file specified by -XMLTemplate.
- -CGITemplate CGI_template_file
- A CGI template file. Specify the name of the CGI template file
if it is in the current directory, or the full path name.
For
the validateXML function, this parameter is optional. If specified,
the XML template file specified as input is converted into CGI format
and output to the file specified by -CGITemplate. If the CGI template
file is to be used by the PKI Services daemon, it
must be named pkixgen.tmpl.
For the convertCGI
function, this parameter is required. The CGI template file specified
is converted to an XML template file using the XML schema file PKIServ.xsd,
which must be in the same directory, and output to the file specified
by -XMLTemplate.
ExamplesExample 1: TemplateTool -validateXML -XMLTemplate pkitmpl.xml -CGITemplate pkixgen.tmpl
Action: Invokes
TemplateTool from the shell script. Validates that the XML template
file pkitmpl.xml is valid, and generates a text CGI
template file from it named pkixgen.tmpl, for use
by the PKI Services daemon.
Example
2: java com.ibm.pki.template.TemplateTool -convertCGI -CGITemplate pkiserv.tmpl
-XMLtemplate pkitmpl.xml
Action: Invokes
TemplateTool from Java. Converts
the text CGI template file named pkiserv.tmpl to
an XML template file named pkitmpl.xml.
|