Catalog notification emails have no content
search cancel

Catalog notification emails have no content

book

Article ID: 257061

calendar_today

Updated On:

Products

CA Service Catalog

Issue/Introduction

CA Service Catalog notification feature is successfully sending emails, but they are always empty/blank.

Steps to reproduce:

1.  Send an email through "sendRequestEmail" WebService Method (WS_Call.TXT) OR send an email through the "Email" button of the "Request Details" web form

Expected result:

An email is received with the desired data, HTML and CSS included when the emails is originated from the WS call

Environment

CA Service Catalog 17.3 and 17.4

Cause

Log file has the following errors repeated many times:

[Fatal Error] requestemailprofile.xsl:507:19: The element type "xsl:otherwise" must be terminated by the matching end-tag "</xsl:otherwise>".
ERROR:  'The element type "xsl:otherwise" must be terminated by the matching end-tag "</xsl:otherwise>".'
jvm 1    | 2022/12/04 18:04:30 | FATAL ERROR:  'Could not compile stylesheet'

It appears that a stylesheet has been altered. 

The problem can be found by comparing the version of the requestemailprofile.xsl in the "view" folder with the version of the same file in the "custom" folder.

Lines 505-507 in the "view" version look like this:

               <a href="{concat(/xmlRoot/icsysteminstall/icprotocol,'://',/xmlRoot/icsysteminstall/ichostname,':',/xmlRoot/icsysteminstall/icportno,'/',/xmlRoot/iccontextname,'/', /xmlRoot/icservletname,'?Node=icguinode.requestprofile&amp;Args=',/xmlRoot/COLLECTION/usm_request/request_id/LITERAL)}" title="{$xslcontent3/view_request_details}" alt="{$xslcontent3/view_request_details}">
                <xsl:value-of select="/xmlRoot/COLLECTION/usm_request/name/LITERAL"/>
                </a>*

The same lines in the "custom" version look like this:

               <!--<a href="{concat(/xmlRoot/icsysteminstall/icprotocol,'://',/xmlRoot/icsysteminstall/ichostname,':',/xmlRoot/icsysteminstall/icportno,'/',/xmlRoot/iccontextname,'/', /xmlRoot/icservletname,'?Node=icguinode.requestprofile&amp;Args=',/xmlRoot/COLLECTION/usm_request/request_id/LITERAL)}" title="{$xslcontent3/view_request_details}" alt="{$xslcontent3/view_request_details}">-->
                <xsl:value-of select="/xmlRoot/COLLECTION/usm_request/name/LITERAL"/>
                </a>*

The the <a> tag in line 505 had been commented out, but that tag does not close until line 507 with the </a> tag.  The closing </a> tag must also be commented out.

Resolution

In the "custom" version of the requestemailprofile.xsl file change to this instead, so that the closing </a> tag is also commented out:

               <!--<a href="{concat(/xmlRoot/icsysteminstall/icprotocol,'://',/xmlRoot/icsysteminstall/ichostname,':',/xmlRoot/icsysteminstall/icportno,'/',/xmlRoot/iccontextname,'/', /xmlRoot/icservletname,'?Node=icguinode.requestprofile&amp;Args=',/xmlRoot/COLLECTION/usm_request/request_id/LITERAL)}" title="{$xslcontent3/view_request_details}" alt="{$xslcontent3/view_request_details}">-->
                <xsl:value-of select="/xmlRoot/COLLECTION/usm_request/name/LITERAL"/>
                <!--</a>-->*