Introduction
Websphere Service Registry and Repository (WSRR) in an SOA Environment is used to register reusable Services exposed on the ESB, capture and maintain the information about Services aka Service Metadata in a single Repository. It provides features such as –
- Service Taxonomy – classify Services based on custom Classification scheme
- Service Governance – provides various lifecycle processes related to Service evolution from conceptual to deploy/manage phases.
- Policy Management – define various policy rules to be met by Service Providers and Consumers
- Business Model – Define Business Model to capture service metadata using Web Ontology Language (OWL)
Background
It is not uncommon to have different WSRR Environments for Development (DEV), Testing (QA), and Production (PROD) in a typical enterprise SOA Infrastructure. One of these repositories plays the role of ‘Governance Repository’ or we might have an additional repository to capture Governance artifacts.
In ideal world, Governance repository should be so called “master repository” and any changes are to be propagated from Governance to the rest. However, Governance WSRR gets out of sync over a period time and there is a need to validate the information in Governance Repository and keep it in sync at regular intervals. The proposed set of code snippets in this article helps in achieving this goal.
The tool might be useful at the time of Migration from previous versions of WSRR as well.
Overview
The solution uses Webservice API to interact with WSRR.
Steps to setup Develop RAD 7.5.5.3 Workspace:
- Import the Ear
Workspace contains 3 projects
ServiceRegistryManger – hosts WSRR Client code. This is a J2EE Application Client Project
ServiceRegistryManagerEAR – Ear Project to deploy the application
Some of the significant classes are:
com.wsrrclient.WSRREntityUpdater
Utility class to update entities based on WSRR REST Queries. The class can be customized to perform conditional updates based on specific needs.
com.wsrrclient.WSRRClassificationsUpdater
This script is useful to update environmental classifications in Governance Repository. If an artifact is promoted to Production, environment classification is updated as ‘Production’ in Governance; same applies for QA and DEV. This ensures that Governance WSRR is updated with accurate information on Service Promotion in a given ESB Environment.
com.wsrrclient.dataload.DocumentExtracter
To extract documents from a given WSRR Environment to the local filesystem.
com.wsrrclient.WSRREntityReader
To generate a report for service metadata
com.wsrrclient.WSRREntityComparator
To compare service metadata from two WSRR Repositories
srm.properties
To specify environmental properties – WSRR URL, user names/passwords etc.
How to Test
- Change the ‘Main’ class to invoke the required utility class methods.
- Create a J2EE Application Client Test Configuration and select ‘ServiceRegistryManager’ as the target.

