When calling collection.getService("XQueryService", "1.0") it seems that
I receive an object of type RemoteXPathQueryService, which is an "exist"
class (as opposed to an org.xmldb class).
All this is well and good. Unfortunately, I need to cast to
org.xmldb.api.modules.XQueryService, but RemoteXPathQueryService does
not implement this interface. Funnily enough, it does implement
XQueryService, but only org.exist's.
I would assume that org.exist.XQueryService should implement
The workaround would be to cast it to
org.xmldb.api.modules.XPathQueryService, which again, ironically, it
does implement. But I need the "declareVariable" functionality of
Another workaround would be to use org.exist's XQueryService, but it
would be nice to keep the application as neutral from an implementation
So my questions are:
1. Is this a bug, or am I misunderstanding something?
2. Any other workaround that doesn't force me to import org.exist.*?
Chief Technology Officer
Business: +972 (3) 766 1806
Mobile: +972 (54) 634 4457
From: Wolfgang Meier <wolfgang@ex...> - 2004-12-22 18:21:57
> When calling /collection/.getService("XQueryService", "1.0") it seems
> that I receive an object of type RemoteXPathQueryService, which is an
> “exist” class (as opposed to an org.xmldb class).
> All this is well and good. Unfortunately, I need to cast to
> *org.xmldb.api.modules.*XQueryService, but RemoteXPathQueryService does
> not implement this interface. Funnily enough, it /does/ implement
> XQueryService, but only org.exist’s.
> I would assume that *org.exist.*XQueryService should implement
Yes, I forgot that the XQueryService had been added to the xmldb API. I
have now modified org.exist.xmldb.XQueryService to extend
has been dropped. It is replaced by org.xmldb.api.base.CompiledExpression.