Calling jar from XQuery

时间:2019-01-07 13:59:45

标签: jar xquery marklogic marklogic-8

I have came across a situation where I have to call a jar with a string parameter and get the result. Is there any way i can able to do this? I came across a link where importing "java:java.lang.Math" namespace using java function inside XQuery. This will help me to use library functions of Java. Is there any way I can call jar or customize function from XQuery?

1 个答案:

答案 0 :(得分:1)

MarkLogic没有办法直接在JAR文件中调用Java方法。通常的做法是将所需的Java功能作为服务提供,然后从MarkLogic进行调用。例如,您可以设置Tomcat来承载JAR文件中保留的功能。