How to call a java service inside XSLT

Hi @vignesh.govindhan ,
Found an old thread that tries to do the same but wasn’t supported . Using WmPublic functions inside xslt stylesheet - #5 by Deltones

Please note that I haven’t tried this , but the XSLT example in the Service Development help guide clearly shows how to call java methods (not java services) from inside an XSLT, refer guide at https://documentation.softwareag.com/webmethods/designer/sdf10-5/10-5_Service_Development_Help.pdf page 380 to 385.
E.g, xmlns:Date="java.util.Date" and use it by calling <xsl:value-of select="Date:toString($date)"/> (page 383)

If your intention is to generate a random id , you can check the javadoc for UUID (Java Platform SE 7 ) and see if this meets your purpose.

Hope this helps,
NP
P.S: A good discussion about its reliability is at How good is Java's UUID.randomUUID? - Stack Overflow

2 Likes