Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
titleNote

The command mvn clean install will trigger an Apache Maven Build in your command line. This requires you having installed Apache Maven. See See Installing Apache Maven for Governance Registry on Windows or  or Installing Apache Maven for Governance Registry on Linux.

A successful run of Apache Maven will generate a report similar to the following:

...

Code Block
languagehtml/xml
<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
titleNote

The command ant run will trigger an Apache Ant Build in your command line. This requires you having installed Apache Ant. See Installing Apache Ant Maven for Governance Registry on Windows or  or Installing Apache Ant Maven for Governance Registry on Linux.

A successful run of Apache Ant will generate a report similar to the following:

...