Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

XSL Error - External function calls have been disabled

Hi everyone,
I'm running into the next error when the flow executes an XSL policy:

 

05/31/2024 12:28 AM EMULATOR ERROR Code : messaging.resource.XSLCompilationFailedWithFatalErrors
05/31/2024 12:28 AM EMULATOR ERROR Message: Compilation of XSL cxsl://stylesheet_java.xsl failed with Fatal Error: Cannot find a matching 2-argument function named {java:com.example.apigee.extensions.MyJavaExtensions}setVariable(). External function calls have been disabled. null

 


The xsl file is : 

 

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ext="java:com.example.apigee.extensions.MyJavaExtensions"
    extension-element-prefixes="ext">

    <xsl:template match="/">
        <xsl:variable name="testvar" select="ext:setVariable('key', 'value')"/>
    </xsl:template>
</xsl:stylesheet>​

 

 
As you can see, I'm trying to call a java function that was previously invoked in the flow. 

How can I enable external function calls?. I'm using apigee emulator to test in my local machine.  I wonder if I will run into the same error once I deploy in Apigee Edge. 

Thank you!
0 5 466
5 REPLIES 5