This example only works when using an XSLT (Transform).
First take a look in the XSD which we are doing the example:
Then let's say that we want to replace any character of "&" (ampersand) that comes in the "Inputvariable" to the following character of "$" (dollar sign).
This is the XSLT that we need to implement the replace java function.
Now these are the steps for implementing the Java Replace Function.
1.- Add the following namespace
"xmlns:strClass="http://www.oracle.com/XSL/Transform/java/java.lang.String"
<xsl:template name="strReplace"> <xsl:param name="param"/> <xsl:value-of select="strClass:replaceAll($param, '\u0026', '#')"/> </xsl:template>
3.- Add the "call-template" XSLT function and comment the actual mapping:
<xsl:call-template name="strReplace"> <xsl:with-param name="param" select="/client:process/client:input"/> </xsl:call-template>
Testing
After deploying the BPEL Composite in the EM using Hello$World.
We got:
No comments:
Post a Comment