Unknown macro: {next_previous_links}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

This sample demonstrates how to apply namespace as a tag while creating a service in order to retrieve the resource using that namespace tag. A tag is a keyword that allows a resource or collection to be found when using the Search function. 

Instructions

  1. Execute the mvn clean install maven command from the taggingHandler/src sample directory.
  2. Copy the org.wso2.carbon.registry.samples.taggingHandler-5.1.0.jar into the <GREG_HOME>/repository/components/dropins directory.
  3. You can also upload handlers through the administration console by clicking Add in the Extensions menu.
     
  4. Edit the registry.xml file which is in <GREG_HOME>/repository/conf folder and add the following XML snippet:

    <handler class="org.wso2.carbon.registry.samples.taggingHandler.CustomTagServiceHandler">
            	<filter class="org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher">
               		 <property name="mediaType">application/vnd.wso2-service+xml</property>
           		</filter>
        	</handler>
  5. You can also add the handler configuration through the administration console.
    1. Click the Extensions menu and open the Handlers configuration menu.
       
    2. Click Add New Handler.
       
    3. Add the handler configuration. 

      See also Configuring Handlers.
  6. Start the server and go to the admin console. See Running the Product for more information.
  7. In the Main menu, under Add in the Metadata section, click Service.
  8. Add a new service.
     
  9. You can see that the namespace tag has been added to the resource.
  • No labels