This sample explains how to create a task query processor that can be scheduled to used to run custom queries on WSO2 Governance Registry in few easy steps. We will be reusing the code of the Handler Sample and the WS-API Sample in this example. This sample requires Apache Maven and Apache Ant. See Installing Apache Maven for Governance Registry on Windows or Installing Apache Maven for Governance Registry on Linux and Installing Apache Ant for Governance Registry on Windows or Installing Apache Ant for Governance Registry on Linux.
...
A successful run of Apache Maven will generate a report similar to the following:
4. Copy the GREG_HOME/
samples/handler/src/target/
org.wso2.carbon.registry.samples.handler-4.5.0.jar
into GREG_HOME/repository/components/dropins
.
...
Code Block | ||
---|---|---|
| ||
<queryProcessor> <processor>org.wso2.carbon.registry.samples.processor.SampleQueryProcessor</processor> <queryType>application/vnd.wso2.sample.query</queryType> </queryProcessor> |
See also Configuration also Configuration for Query Processors.
7. Start the WSO2 Governance Registry server. See Starting Governance Registry Management Console on Windows or Starting Governance Registry Management Console on Linux.
...
A successful run of Apache Ant will generate a report similar to the following:
11. Now observe the command prompt of the WSO2 Governance Registry Server. You should find a line similar to the following printed on your command prompt, which indicates that you query has successfully executed.
...
...
The command ant run
will trigger an Apache Ant Build in your command line. This requires you having installed Apache Ant.
Code Block |
---|
Executing Sample Query with Query: Hello World Query |
Excerpt | ||
---|---|---|
| ||
Instructions on how to create query processors processor that can be used to execute custom queries. |