This discussion is archived
0 Replies Latest reply: Jul 4, 2012 1:45 AM by 935131 RSS

Custom XPath Functions in 11.1.1.6

935131 Newbie
Currently Being Moderated
I am trying to create two custom XPath functions within the same namespace which are to be available in all SOA suite components. I can get the functions to work successfully in the XSL mapper but not in the BPEL engine. As I understand it the XSL mapper finds the functions implementation by looking for a static method with the same name and arguments as the function in the class whose name forms the suffix to namespace so given the following configuration file the MyFunctions class must include two methods which have one String argument and return String and are called "rawBase64ToHex" and "hexToBase64Raw".

-----ext-soa-xpath-functions-config.xml-----
<soa-xpath-functions
xmlns="http://xmlns.oracle.com/soa/config/xpath"
xmlns:myfuncs="http://www.oracle.com/XSL/Transform/java/my.dummy.package.MyFunctions">
<function name="myfuncs:hexToBase64Raw">
<className>my.dummy.package.HexToBase64Raw</className>
<return type="string"/>
<params>
<param name="hexString" type="string" minOccurs="1" maxOccurs="1"/>
</params>
</function>
<function name="myfuncs:rawBase64ToHex">
<className>my.dummy.package.RawBase64ToHex</className>
<return type="string"/>
<params>
<param name="rawBase64String" type="string" minOccurs="1" maxOccurs="1"/>
</params>
</function>
</soa-xpath-functions>

For the functions to be available in BPEL the class referenced in the "className" must exist and implement "oracle.fabric.common.xml.xpath.IXPathFunction" which requires a single "call" method which is defined thus:
public Object call(IXPathContext ixPathContext, List<?> args)

Finally the classes must be packaged in a JAR with the configuration file located in META-INF and copied to /Oracle/Middleware/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1
finally "ant" must be ran in the this location to update the classpath and the server restarted.

I have also tried following the instructions here: http://docs.oracle.com/cd/E28389_01/doc.1111/e17364/customxpath.htm

and using inner classes as well as deploying the actual classes and updating the ext-soa-xpath-functions-config.xml file under "/Oracle/Middleware/Oracle_SOA1/soa/modules/oracle.soa.ext_11.1.1/classes/META-INF"

Is there something I am not understanding about how this works or is there a bug as I can get the functions to appear correctly in JDeveloper. Any help will be much appreciated.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points