This sample explains how to create a query processor that can be 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.
Instructions
1. Navigate to GREG_HOME/
samples/handler/src
to find the source code of the Handler Sample.
...
Info | ||
---|---|---|
| ||
The command |
A successful run of Apache Maven will generate a report similar to the following:
...
Code Block | ||
---|---|---|
| ||
<queryProcessor> <processor>org.wso2.carbon.registry.samples.processor.SampleQueryProcessor</processor> <queryType>application/vnd.wso2.sample.query</queryType> </queryProcessor> |
See also Configuration for Query Processors.
7. Start the WSO2 Governance Registry server. See Starting Governance Registry Introducing the Management Console on Windows or Starting Governance Registry Management Console on Linux.
8. After the server has successfully started, navigate to GREG_HOME/
samples/ws-client
to find the source code of the WS-API Sample.
...
Info | ||
---|---|---|
| ||
The command |
A successful run of Apache Ant will generate a report similar to the following:
...