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
1 | "xmlns:strClass="http://www.oracle.com/XSL/Transform/java/java.lang.String" |
1 | < xsl:template name = "strReplace" > |
2 | < xsl:param name = "param" /> |
3 | < xsl:value-of select = "strClass:replaceAll($param, '\u0026', '#')" /> |
4 | </ xsl:template > |
3.- Add the "call-template" XSLT function and comment the actual mapping:
1 | < xsl:call-template name = "strReplace" > |
2 | < xsl:with-param name = "param" |
3 | select = "/client:process/client:input" /> |
4 | </ xsl:call-template > |
Testing
After deploying the BPEL Composite in the EM using Hello$World.
We got:
No comments:
Post a Comment