how to call a preference value in XSLT in SOA
how to call a preference value in XSLT in SOA?
Solution:
Function to retrieve the preference :
http://www.xenta.nl/blog/2009/10/28/oracle-soa-suite-11g-setting-and-getting-preferences/
Create
a new xsl mapping and let the 'first' parameter be some messageType
variable (for example the inputVariable, or some other variable you use
for your main input).
In the xslt add between the "<xsl:stylesheet>"-tag and the "<xsl:template match=".">"-tag something like "<xsl:param name="myPref" />"
Your xsl is ready to receive the extra input parameter.
Now in your bpel process do something like this
<copy>
<from expression="ora:doXSLTransformForDoc('xsl/myxslt.xsl', $inputVariable.input, 'myPref', ora:getPreference(myPref))"/>
<to variable="myresult"/>
</copy>
or first assign ora:getPreference(myPref) to myPrefVar (xsd:string) and then use
<copy>
<from expression="ora:doXSLTransformForDoc('xsl/myxslt.xsl', $inputVariable.input, 'myPref', $myPrefVar)"/>
<to variable="myresult"/>
</copy>
Solution:
Function to retrieve the preference :
http://www.xenta.nl/blog/2009/10/28/oracle-soa-suite-11g-setting-and-getting-preferences/
In the xslt add between the "<xsl:stylesheet>"-tag and the "<xsl:template match=".">"-tag something like "<xsl:param name="myPref" />"
Now in your bpel process do something like this
<from expression="ora:doXSLTransformForDoc('xsl/myxslt.xsl', $inputVariable.input, 'myPref', ora:getPreference(myPref))"/>
<to variable="myresult"/>
</copy>
or first assign ora:getPreference(myPref) to myPrefVar (xsd:string) and then use
<from expression="ora:doXSLTransformForDoc('xsl/myxslt.xsl', $inputVariable.input, 'myPref', $myPrefVar)"/>
<to variable="myresult"/>
</copy>
Comments
Post a Comment