Reputation: 1510
Is it possible to call java function using XQuery in MarkLogic. ?
Please refer - https://stackoverflow.com/questions/65953901/calling-java-method-from-xquery
Example -
declare namespace math="java:java.lang.Math";
math:sqrt(2)
Upvotes: 2
Views: 116
Reputation: 8422
There's no way to directly call a Java function from MarkLogic XQuery. If the Java code is accessible through a web service, you can use xdmp:http-get
and similar.
As noted by Martin, depending on what functionality you're trying to access, you might not need to use Java.
Upvotes: 1