O'Reilly logo

Oracle SOA Suite 11g Developer's Cookbook by Matt Wright, Antony Reynolds

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a custom XPath function for SOA Suite

In this recipe, we will create a custom XPath function in java that can be used by any composite component in an assign or transform. This enables us to add complex logic into our XPath expressions without making an explicit call to Java. We will use the example of calculating the mean and standard deviation of a set of numbers.

Getting ready

Our XPath function will have a signature, as shown in the following code snippet:

double getStdDev(values as node-set)

It will take the value of each node in the input node set, calculate it, and return the standard deviation.

How to do it...

  1. Create a project with the appropriate libraries that are required by XPath.

    In JDeveloper create a new Java project. From the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required