3 Replies Latest reply on Nov 25, 2019 9:46 AM by Carl Wilson

    Can I capture this value : A fault occurred while evaluating a stylesheet

    Rakesh Rajasekar
      Share This:

      On below results can I capture [Message=Summary: A fault occurred while evaluating a stylesheet. only in some content and replace some null value in the <soap-message>${XMLTalend}</soap-message>

       

       

       

      25 Nov 2019 12:32:14,979 [Current Time=Mon Nov 25 12:32:14 CET 2019] [Process Name=:UTS_Events:Outbound_Events:UTS_Event_To_Talend] [Root Job Id=69948b91850f0ba2:-545bc6a:16e8d958ae0:-80001-1574681534680] [Job Id=69948b91850f0ba2:-545bc6a:16e8d958ae0:-80001-1574681534680] [Message=Summary: A fault occurred while evaluating a stylesheet.

       

      Detail:The stylesheet is:

       

       

      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

        <xsl:output indent="no" />

        <xsl:template match="/">

          <request-data>

            <soap-rpc-request>

              <use-ssl-certificate>

                <xsl:text disable-output-escaping="no">$[SLCert]</xsl:text>

              </use-ssl-certificate>

              <install-certificate>

                <xsl:text disable-output-escaping="no">$[installcert]</xsl:text>

              </install-certificate>

              <allow-unsigned-certificate>

                <xsl:text disable-output-escaping="no">$[unsignedcert]</xsl:text>

              </allow-unsigned-certificate>

              <passphrase>

                <xsl:text disable-output-escaping="no">$[passphrase]</xsl:text>****MASKED****</passphrase>

              <http-connection-properties />

              <transport>

                <xsl:text disable-output-escaping="no">$[transport]</xsl:text>

              </transport>

              <soap-url>

                <xsl:text disable-output-escaping="no">$[url]</xsl:text>

              </soap-url>

              <soap-message>${XMLTalend}</soap-message>

              <Event_ID>

                <xsl:text disable-output-escaping="no">$[UTS_Event_ID]</xsl:text>

              </Event_ID>

            </soap-rpc-request>

          </request-data>

        </xsl:template>

      </xsl:stylesheet>

       

       

      The input document is:

       

       

      <result></uts:statusReason>

                        <uts:mainCI>203476088</uts:mainCI>

                        <uts:scheduledStartDate>1574463600</uts:scheduledStartDate>

                     </uts:crq>

                     <uts:change>

                        <uts:modifiedDate>1574432635</uts:modifiedDate>

                        <uts:modifiedBy>Remedy Application Service</uts:modifiedBy>

                     </uts:change>

                  </uts:updateCRQ>

               </uts:utsUpdateEvent>

            </tb:UTSEvent>

         </soapenv:Body>

      </soapenv:Envelope></result>

       

       

      Fault details: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException; lineNumber: 25; columnNumber: 25; The element type "soap-message" must be terminated by the matching end-tag "</soap-message>".]

      25 Nov 2019 12:32:15,008 [Current Time=Mon Nov 25 12:32:15 CET 2019] [Process Name=:UTS_Events:Outbound_Events:UTS_Event_To_Talend] [Root Job Id=69948b91850f0ba2:-545bc6a:16e8d958ae0:-80001-1574681534680] [Job Id=69948b91850f0ba2:-545bc6a:16e8d958ae0:-80001-1574681534680] [Error=An error occurred that triggered compensation:]

      [TEXT=  Summary: Execution failed.

       

       

      Caused by:

         Summary: An attempt to access a parameter failed.

       

       

        Caused by:

          Summary:

       

       

         Caused by:

           Summary: Invalid transform

           Detail: ERROR: Unable to perform transform

      =======================

      Source document :

      <result></uts:statusReason>

                        <uts:mainCI>203476088</uts:mainCI>

                        <uts:scheduledStartDate>1574463600</uts:scheduledStartDate>

                     </uts:crq>

                     <uts:change>

                        <uts:modifiedDate>1574432635</uts:modifiedDate>

                        <uts:modifiedBy>Remedy Application Service</uts:modifiedBy>

                     </uts:change>

                  </uts:updateCRQ>

               </uts:utsUpdateEvent>

            </tb:UTSEvent>

         </soapenv:Body>

      </soapenv:Envelope></result>

       

       

      =======================

      Transform before token replacement:

      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

        <xsl:output indent="no" />

        <xsl:template match="/">

          <request-data>

            <soap-rpc-request>

              <use-ssl-certificate>

                <xsl:text disable-output-escaping="no">$[SLCert]</xsl:text>

              </use-ssl-certificate>

              <install-certificate>

                <xsl:text disable-output-escaping="no">$[installcert]</xsl:text>

              </install-certificate>

              <allow-unsigned-certificate>

                <xsl:text disable-output-escaping="no">$[unsignedcert]</xsl:text>

              </allow-unsigned-certificate>

              <passphrase>

                <xsl:text disable-output-escaping="no">$[passphrase]</xsl:text>****MASKED****</passphrase>

              <http-connection-properties />

              <transport>

                <xsl:text disable-output-escaping="no">$[transport]</xsl:text>

              </transport>

              <soap-url>

                <xsl:text disable-output-escaping="no">$[url]</xsl:text>

              </soap-url>

              <soap-message>${XMLTalend}</soap-message>

              <Event_ID>

                <xsl:text disable-output-escaping="no">$[UTS_Event_ID]</xsl:text>

              </Event_ID>

            </soap-rpc-request>

          </request-data>

        </xsl:template>

      </xsl:stylesheet>

            

      =======================

      Transform after token replacement

      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

        <xsl:output indent="no" />

        <xsl:template match="/">

          <request-data>

            <soap-rpc-request>

              <use-ssl-certificate>

                <xsl:text disable-output-escaping="no">$[SLCert]</xsl:text>

              </use-ssl-certificate>

              <install-certificate>

                <xsl:text disable-output-escaping="no">false</xsl:text>

              </install-certificate>

              <allow-unsigned-certificate>

                <xsl:text disable-output-escaping="no">true</xsl:text>

              </allow-unsigned-certificate>

              <passphrase>

                <xsl:text disable-output-escaping="no">changeit</xsl:text>

              </passphrase>

              <http-connection-properties />

              <transport>

                <xsl:text disable-output-escaping="no">https-rpc</xsl:text>

              </transport>

              <soap-url>

                <xsl:text disable-output-escaping="no">http://demucvpr111:8201/services/UTS_TalendBus?wsdl</xsl:text>

              </soap-url>

              <soap-message></uts:statusReason>

                        <uts:mainCI>203476088</uts:mainCI>

                        <uts:scheduledStartDate>1574463600</uts:scheduledStartDate>

                     </uts:crq>

                     <uts:change>

                        <uts:modifiedDate>1574432635</uts:modifiedDate>

                        <uts:modifiedBy>Remedy Application Service</uts:modifiedBy>

                     </uts:change>

                  </uts:updateCRQ>

               </uts:utsUpdateEvent>

            </tb:UTSEvent>

         </soapenv:Body>

      </soapenv:Envelope></soap-message>

              <Event_ID>

                <xsl:text disable-output-escaping="no">EV0000000002330</xsl:text>

              </Event_ID>

            </soap-rpc-request>

          </request-data>

        </xsl:template>

      </xsl:stylesheet>

            

      =======================

      Error

      javax.xml.transform.TransformerException: org.xml.sax.SAXParseException; lineNumber: 25; columnNumber: 25; The element type "soap-message" must be terminated by the matching end-tag "</soap-message>".

            

       

       

          Caused by:

            Summary: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException; lineNumber: 25; columnNumber: 25; The element type "soap-message" must be terminated by the matching end-tag "</soap-message>".

       

       

           Caused by:

             Summary: org.xml.sax.SAXParseException; lineNumber: 25; columnNumber: 25; The element type "soap-message" must be terminated by the matching end-tag "</soap-message>".

       

       

            Caused by:

              Summary: The element type "soap-message" must be terminated by the matching end-tag "</soap-message>".

      ]

       

      Thanks,

      Rakesh