Thursday, July 14, 2011

OSB Custom XPath: XQuery expression validation failed: {err}FONS0003: : prefix not defined in static context

I have created a Custom XPath function, and the entry in osb-built-in.xml is:

            Fills the TSScache with all elements, using Id as a key
            java.lang.String initTSSArray(java.lang.String, [Lorg.apache.xmlbeans.XmlObject;)

When using the new XPath function, I have to precede it with the Namespace prefix generated by OSB :


Problem is, in Eclipse this nisnx is not defined. So I add nisnx as a static prefix in the Proxy Workflow, and next thing I get is:

XQuery expression validation failed: {err}XQ0017: unknown function (or number of arguments (0) is wrong)

The problem now is how to register the custom function in Eclipse.

I will find out one day....

The official documentation says nothing on the topic:

It turns out that, if Eclipse is installed in

you must copy the XML and JAR file to

at this point Eclipse will recognize the Custom XPath functions (after restart and clean).

My problem was that I had deployed the JAR and XML only to my remote installation, not to the local OSB installation. So Eclipse could not see the definition of the XPath Functions.

see also:

and watch this cool video

No comments: