0 Replies Latest reply on Jul 4, 2012 8:45 AM by 935131

    Custom XPath Functions in

      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".

      <function name="myfuncs:hexToBase64Raw">
      <return type="string"/>
      <param name="hexString" type="string" minOccurs="1" maxOccurs="1"/>
      <function name="myfuncs:rawBase64ToHex">
      <return type="string"/>
      <param name="rawBase64String" type="string" minOccurs="1" maxOccurs="1"/>

      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.