When defining the new custom xpath functions for use in the service bus make sure you don’t prefix the name of the function you want to use
[sourcecode language=”xml”]
[/sourcecode]
Use
[sourcecode language=”xml”]
[/sourcecode]
instead of
[sourcecode language=”xml”]
[/sourcecode]
no namespace prefix on the name
Otherwise on designtime you will receive some error message like :
[sourcecode language=”xml”]
!MESSAGE [Error Handler, FinalErrorHandler, Assign action] XQuery expression validation failed: line 6, column 32: {err}FONS0003: “func4”: prefix not defined in static context
[/sourcecode]
7 Responses to “Oracle Service Bus custom xpath functions, prefix not defined in static context”
{
{
if (fn:contains (data($MethodResponseActivation), ‘not’ ))
then
1
Everytime a declare a path to retrieve the value “1” using the following path :
$statusCode1/ctx:route/ctx:status/code:statuscode ….
I get the following error:
prefix not defined in static context for “code”
did you add the namespace ‘code’ ?
when you use assign/replace/etc at the right of the window/popup you have an option to show all the current added namespaces, is your there ?
Hi Eric,
I have a requirement like three different requests all are converted in to standard format.For this scenario I use dyamic X-query transformation.For Example RequestA,RequestB and RequesrC what ever request it should be converted into one standard format say Response.For this I create three X-Query transformations,and proxy service.If i get the request from RequestA related XQuery will execute (RequstA to Response transformation).
RequestA——Response
RequestB——Response
RequestC——Response
Actually my idea is based on requset schema name (like RequestA) it will convert,for this scenario how can I set condition in dynamicXquery.
Thanks in advance.
Hi Eric,
In Project i am using Xquery function in that i am using dvmlookup funtion :soanM:lookupValue($dvm1,$CollegeCode,’CollegeCode’,’CollegeName’,’N/A’) but when i was trying to run it… it is giving an error : error occurred while executing xquery: line 11,column 32: {err}FONS0003:”soanM”:Prefix not defined in static context.
Either the Xquery is invalid or it contains custom xquery functions. can you please help me out in this… It helps me a lot
Thanks in advance
Uday
Do you run/test it locally or on runtime from within your MessageFlow ?
First i trying to test .xq in Eclipse it self…
When i was trying to test it in “Result Data” i am getting that ErrorMessage…
[…] http://www.xenta.nl/blog/2010/07/14/oracle-service-bus-custom-xpath-functions-prefix-not-defined-in-… […]