Skip to main content

Developing with XCC

ModuleRunner

This program allows you to invoke a module on the server. The module must exist under the XDBC server root, either in the database (when a modules database is configured) or on the filesystem (when the filesystem is configured for modules). The following is a sample command to run the ModuleRunner class:

java -classpath "XCC_HOME/lib/xcc.jar:XCC_HOME/lib/xccexamples.jar"
     com.marklogic.xcc.examples.ModuleRunner 
     xcc://username:password@localhost:8021 hello.xqy

This invokes the module named hello.xqy. The request is submitted to the XDBC Server running on the local machine at port 8021, using the credentials username and password to authenticate the connection. The module path is resolved relative to the XDBC Server root.