xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitri.Coleba...@toyota.com.au
Subject OT: Question about integrating with BEA's XQuery engine
Date Tue, 20 Apr 2004 01:17:09 GMT

hey all,

Firstly, anyone who is on the user list can ignore this, I've already asked
this question there and didn't receive any responses.  I'm hoping someone
here might be able to help me out.  I'll cut and paste my email to the user

hey all,

Firstly, this is a little off topic, so if you're not interested in the
subject, stop reading (o:

I've just received a task that is absolutely crying out for the ability to
use external functions and whilst I've "needed" this in the past, I've been
able to work around it without too much trouble.

My question to the list is - has anyone tried/had success binding external
functions using XQuery and xqrl.jar from WL 8.1 (SP2)?  Or does anyone have
any advise for the best starting point to do this.

I've looked at various possible points to hook into the code, as I
understand it BEA's XQuery implementation does allow binding external
functions, the only problem is that its not exposed via XMLBeans.  At the
moment I'm looking at com.bea.xquery.operators.Operator which I assume I'll
need to implement and have also looked at com.bea.xquery.xdbc.Connection
and com.bea.xquery.xdbc.Context which has a method called addOperator on
it.  So what I'm trying atm is this:

            XmlObject xml =

            Connection connection = DriverManager.getConnection();
            Operator operator = new Operator(BEA_QNameToken.create(new
MyBEA_Token((short) 0, "foobar"), new MyBEA_Token((short) 0,
                                             new Signature(new ArrayList(),


            xml.execQuery("declare namespace
toyota=\"http://toyota.com.au/xquery\"" + Str.LINE_SEPARATOR +

this throws a runtime exception caused by a class cast exception so I'm not
having much luck atm.

I'd be greatful for any input here...


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/

View raw message