unsual behaviour of workflow - problem in transforming
seetharaman k Jan 17, 2019 1:54 PMHi
i have a work flow in which a REST data comes in jason format. and then passing this to the json to xml utility. now i need to transform this resultant xml to HTML to send to email body .
unfortunately am facing hell a lot of problem here . in short its not working below are the details
<XML>
<json>
<rest-adapter-response>
<header-lines>
<set-cookie>sap-usercontext=sap-client=300; path=/</set-cookie>
<content-length>9834</content-length>
<sap-perf-fesrec>35838.000000</sap-perf-fesrec>
<content-type>application/json</content-type>
</header-lines>
<metadata>
<status>success</status>
</metadata>
<status-line>
<reason>OK</reason>
<code>200</code>
</status-line>
<message-body>
<IDOCDATA>
<STATUS>
<MESSAGE>Amount is getting mismatched while posting invoice for PO4500033056</MESSAGE>
<STATUS>Balance not zero: 0.05- debits: 200.45 credits: 200.40</STATUS>
<CREATION_DATE>2016-05-20</CREATION_DATE>
</STATUS>
<IDOC>0000000007214348</IDOC>
</IDOCDATA>
<IDOCDATA>
<STATUS>
<MESSAGE>Amount is getting mismatched while posting invoice for PO8100999900</MESSAGE>
<STATUS>Balance not zero: 0.20- debits: 191,143.20 credits: 191,143.00</STATUS>
<CREATION_DATE>2016-05-25</CREATION_DATE>
</STATUS>
<IDOC>0000000007219189</IDOC>
</IDOCDATA>
</message-body>
</rest-adapter-response>
</json>
</XML>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:text disable-output-escaping="yes"><IDOCLIST></xsl:text>
<xsl:text disable-output-escaping="yes"><html><body><b></xsl:text>
<xsl:value-of select="/XML/json" disable-output-escaping="yes" />
<xsl:text disable-output-escaping="yes"></b></body></html></xsl:text>
<xsl:text disable-output-escaping="yes"></IDOCLIST></xsl:text>
</xsl:template>
</xsl:stylesheet>
i verified this transform also , using this site Free Online XSL Transformer (XSLT) - FreeFormatter.com its cool .
below is the tree view of the above xslt
ip of this transfomration is the o/p of the json to xml workflow which is a an XML
o/p of this transformation is a body of the email which am going to sent itshould be something like this
<IDOCLIST>
<html>
<body>
<b>
value i got from the xml
</b>
</body>
</html>
attached is the log , how ever belos is the smtp req and response
[adapter request=
<request-data>
<smtpRequest>
<from><![CDATA[baobot@xxxxx.com]]></from>
<to>
<address><![CDATA[baobot@xxxxx.com]]></address>
</to>
<subject>IDOC FAILURE</subject>
<body /> -----> this is where the transformed content should have come but its not coming.
<character-set />
<content-type />
</smtpRequest>
</request-data>]
18 Jan 2019 01:16:48,354 [Current Time=Fri Jan 18 01:16:48 IST 2019] [Process Name=:sample_module:Send Email] [Root Job Id=e4e37044e48bfb60:3e879be:1685d4c4042:-80001-1547754407229] [Job Id=e4e37044e48bfb60:3e879be:1685d4c4042:-80001-1547754407229/:sample_module:ERP-Failed-IDOC-Monitoring:start:call-process[2]]
[adapter response=
<smtp-response>
<metadata>
<status>success</status>
</metadata>
</smtp-response>]
-
log.txt 77.2 K