Introduction to WebSphere Service Registry and Repository
IBM® WebSphere® Service Registry and Repository (hereafter called WSRR) is a system for storing, accessing and managing information, commonly referred to as service metadata, used in the selection, invocation, management, governance and reuse of services in an SOA. In other words, it is where you store information about services in your systems or other organizations' systems, that you use, plan to use, or want to be aware of. For example, an application can check WSRR just before invoking a service to locate the service instance best satisfying its functional and performance requirements. WSRR also plays a role in other stages of the SOA life cycle. It encompasses a registry that contains information about services, such as their interfaces, operations, and parameters, and a metadata repository that provides a robust, extensible framework for the diverse nature of service usage. WSRR also provides management and governance capabilities that enable you to get the most business value from your SOA. In short, WSRR is an essential component of your SOA.
This article, Part 1, shows you how to use WSRR Studio to create business models, life cycles and classification systems. Part 2 will show you how to create governance policies and translatable messages, and how to configure access controls. WSRR V7.5 provides two Web-based user interfaces (UIs): the original UI that has always been part of WSRR, and a new Business Space UI, which is easier to use and is the strategic direction for future versions. Part 3 will show you how to configure the new Business Space UI for the artifacts created in Part 1.
For information on how to customise the original WSRR UI, see the 2009 article on developerWorks Customising the WebSphere Service Registry and Repository user interface.
This article uses a simple scenario that will enable you to understand how to customize of WSRR, but will not bog you down with unnecessary complexity and SOA jargon.
The scenario involves bakers and cafes, where cafes create orders that bakers elect to fulfill. The cafes and bakers are users in a user registry (such as . LDAP), and all of the orders are represented by instances of business models. The orders are then transitioned through a custom life cycle from creation to completion. A more detailed description of each aspect of the scenario is given in each section of the article.
Introduction to and creation of business models
Business models enable you to represent, inside WSRR, objects that are relevant to your organization. They define a template for instances of business objects and enable you to specify properties and relationships, as well as define custom cardinality. Business models are defined using the Web Ontology Language (OWL). For example, you might wish to represent physical pieces of hardware in WSRR, so you would create an OWL file with properties representing information pertinent to the hardware, such as hostname, IP address, operating system, and processor type. OWL lets you specify the type of these properties, so hostname would be string, whilst operating system might be an enumeration with specific options specified. You can also specify that there must be a relationship to an instance of another business model, perhaps the owning organization in charge of the hardware. WSRR would enforce all of these rules and prevent the creation of an instance that does not conform to the model.
From the point of view of the scenario, see Figure 1 below, which shows the hierarchy of the business models. The top level object is the Order, an abstract class that is inherited by FoodOrder and BoxOrder. The box order is used by the bakers to order packaging for their products. Food Order is another abstract class inherited by the three food types actual order classes: Doughnut, Pasty, and IcedBun. At each object level are the properties and relationships relevant to each object.
Prior to WSRR V6.3, you had to create OWL by hand or by using third-party tools, but now WSRR includes Studio, an Eclipse-based application that enables you to create your own models in UML and generate WSRR configuration artifacts. To use Studio to create the model shown in Figure 1:
- Assuming Studio has been installed, start Studio and create a new WSRR Configuration Project. Create a Governance Enablement Profile (GEP) because, even though you won't take advantage of any of its models, it is the recommended profile:
- Once Studio is loaded, click File => New => WSRR Configuration Project., enter a name such as . CafeAndBakerScenario, and select the template to use.
- Select Governance Enablement Profile -- WSRR V7.5, and click Finish. You now have a configuration profile in which to create our model.
- Create the model: Right-click CafeAndBakerScenario and select New => WSRR Business Model. In the resulting wizard, enter the following information:
Input data for and description of Business Model Creation Wizard
| Field | Description | Input |
|---|---|---|
| UML package name | File name of the model -- must be unique in the project. | OrderModel |
| Base URI | URI to uniquely identify this model. It should start with a URI scheme, such as . http:// | http://ibm.com/Scenario/BusinessModel |
| Label | Used by Studio in place of the name | order |
| Comment | Purely a comment. | Optional |
| Prefix | Used to prefix all generated configuration files in order to separate them from other configuration items. Also used when querying for properties or relationships. | order |
| Target configuration project | Project where the model will be created. | CafeAndBakerScenario |
Figure 1. Business models and their relationships

- Begin drawing the model on the canvas: Drag the Class icon from the palette on the right (or click once on the icon and then on the canvas), and then type the class name to create the six classes shown in Figure 1 above. You can see this action being done in Figure 2:
Figure 2. Creating a new class

- Connect the classes: Click on Generalization on the palette, and then drag from the child class to the parent class. Perform this action for all of the child classes, as shown in Figure 1 above by the arrows with triangular arrowheads. Ignore the arrow from FoodOrder to BoxOrder.
- Specify the attributes for the classes: Hover the mouse over a class to open up another palette. The leftmost option is Add Attribute. Click it and type the name of the attribute you want to add. Follow this procedure for all attributes shown in the diagram. Don't worry about attribute types for now.
- Create enumeration types:
- Before you can specify the types of the attributes in the previous step, you must define enumerations: Expand CafeAndBakerScenario and Models, right-click <<BusinessModelPackage>> OrderModel, and click Add UML => Enumeration. Then type the name of the enumeration, in this case Size, and press Enter.
- Right-click the Enumeration and click Add UML => Enumeration Literal. Type the name of the literal, in this case Small. Repeat for Medium and Large. Then create the other enumerations shown below. The results are shown in Figure 3 below.
Enumerations and enumeration literals to define.
| Enumeration | Enumeration Literals |
|---|---|
| Type | Ring Filled |
| Flavor | Strawberry Raspberry Custard |
| Icing | Plain Flavored None |
Figure 3. Enumerations and enumeration literals in the WSRR Configuration Project Explorer view.

- Specify attribute types and cardinality: Specify several properties of one attribute, and then repeat that step for all attributes. Click on <<BusinessModelProperty>> DateRequired on the Order class (if the digram is not in focus, click to bring it into focus and then click again). The General tab of the Properties view will open at the bottom of the screen, as shown in Figure 4 below.
- Specify the type and multiplicity (cardinality) of the attribute: Click on Select type and type date into the search box, and then select date (not dateTime) from the available options and click OK.
- Next, as this is to be a required field, ensure that Multiplicity is set to 1. Then repeat for the properties listed below (DateRequired is included again as an example).
Attribute types and cardinality.
| Class | Property name | Type | Multiplicity |
|---|---|---|---|
| Order | DateRequired | Date | 1 |
| Quantity | integer (XSDDataTypes) | 1 | |
| FoodOrder | UnitPrice | float (XSDDataTypes) | 1 |
| BoxOrder | Size | Size (OrderModel) | 1 |
| Doughnut | Type | Type (OrderModel) | 1 |
| Flavor | Flavor (OrderModel) | 1 | |
| Icing | Icing (OrderModel) | 1 | |
| Pasty | Filling | string (XSDDataTypes) | 1 |
| Iced Bun | Icing | Icing (OrderModel) | 1 |
Figure 4. General tab of the Properties view

Only three of the stereotype properties are relevant now that you are going to use Business Space: label, ID, and defaultValue, and they are explained below. As before, the instructions show you how to specify the properties for one attribute as an example and then you can specify the others:
- With the Class diagram still open, click <<BusinessModelProperty>> DateRequired: date.
- In the Properties view, open the Stereotypes tab as shown in Figure 5 below, and at the bottom observe the Stereotypes Properties table.
Stereotyped properties for Business Model attributes.
| Stereotyped Property | Description |
|---|---|
| defaultValue | as the name suggests, a default value for the attribute. |
| ID | The id is used to link two or more attributes (across classes) so that they are the same in the generated OWL. Normally leave this blank, but specify the same value for all attributes that you wish to link. For example the two classes, IcedBun and Doughnut both have an attribute Icing, as this is the same type in both classes then we can set the ID as Icing, for both attributes, also setting the type the same for both attributes. This allows both attributes to have the same name and leads to only one shared data type in the OWL. |
| label | this is a label for the attribute. Attribute names are restricted, in terms of use of spaces, etc, so if you need to specify a less restrictive name then use this property. Using the Translatable Message editor allows labels to be set for other languages, more on that later. |
| comment | I know I said only three matter, but this fourth might interest you too. This is a comment which is included in the generated OWL file but never used in WSRR. |
- For <<BusinessModelProperty>> DateRequired: date, specify the label as Date Required. Repeat for the following properties:
Stereotype property settings for our Business Model properties.
| Class | Property name | label | ID |
|---|---|---|---|
| Order | DateRequired | Date Required | |
| Quantity | Quantity | ||
| FoodOrder | UnitPrice | Unit Price | |
| BoxOrder | Size | Size | |
| Doughnut | Type | Type | |
| Flavor | Flavor | ||
| Icing | Icing | Icing | |
| Pasty | Filling | Filling | |
| IcedBun | Icing | Icing | Icing |
Figure 5. Stereotypes tab of the Properties view

- Specify the relationship between FoodOrder and BoxOrder: Every food order must have a box order before it can be shipped, which is modeled by connecting FoodOrders to BoxOrders with a directed association, resulting in a relationship in WSRR: Click Directed Association then click FoodOrder and drag to BoxOrder.
- Type the name of the relationship, for example Box, to specify a relationship from FoodOrder to an object of type BoxOrder.
- From the Properties view, as you did for attributes, specify the multiplicity (for the BoxOrder side) as 0..1, and on the Stereotypes tab set the label as Box Order.
- Ensure that your diagram is the same as in Figure 1 and then save the model: Click File => Save. The business model is now fully modeled and ready to generate a WSRR configuration.
- Right-click CafeAndBakerScenario and click Generate All WSRR Artifacts. After a short wait you should see a success message.
Creating life cycles and classification systems
Life cycles are a means of controlling the governance of objects in WSRR. Specified in State Adaptive Choreography Language (SACL), life cycles are a set of states and transitions between those states. Transitions can be either manual or automatic, which means that when a state is reached, the transition occurs immediately and the object moves into the next state. Life cycles are analogous to the concept of state machines and when using Studio are defined in UML.
In WSRR, you can load only one life cycle configuration at any one time. When you create a new life cycle in Studio, what actually happens is that you create a new composite life cycle, and when you initially govern an object, you select the desired composite life cycle.
Classification systems are used to organize and find artifacts in WSRR. Hierarchical classification systems provide a granular method of categorizing objects according to business need. You can classify an object more than once, in which case the object is returned in searches performed on any of those classifications. Services can therefore be retrieved depending on the business context. You can use classification systems to simplify the task of finding objects such as services, making it easier to reuse and compose them. Classifications, like business models are specified in Web Ontology Language (OWL). Classifications are linked with life cycles, because when an object is in a governance state, it is classified as that state, which makes searching based on governance state easy to perform.
- Create a new life cycle model: Right-click CafeAndBakerScenario and select New=> WSRR Life Cycle. In the resulting wizard enter the following information:
Life cycle creation dialog inputs
| Field | Description | Input |
|---|---|---|
| Name | A name representing the life cycle, used in Studio and in WSRR when initiating the life cycle. | OrderLifeCycle |
| Label | This is used by WSRR only when referring to the life cycles classification system from the Configuration perspective. | Order Life Cycle |
| Web UI display name | The name used in the generated WSRR UIs Menu Bar to refer to the life cycle. | Order Life Cycle |
| Comment | This is purely a comment | Optional |
| Web UI description | This is just another comment | Optional |
| Target configuration project | The project where the model will be created. | CafeAndBakerScenario |
- Create four new states on the canvas: Drag State from the Palette on the right side on to the canvas four times.
- Rename all the states, including the Initial and Final states: Click on the automatically assigned name until it is highlighted (it may take several clicks), and then type over the old name to rename each state.
- With a state selected, open the Properties view at the bottom of the screen and navigate to the Stereotypes tab to set the label. From InitialState to FinalState, rename all states and apply their labels as shown below:
Old and new names for states in the life cycle
| Original Name | New Name | Label |
|---|---|---|
| InitialState | CandidateOrder | Candidate Order |
| State1 | SubmittedOrder | Submitted Order |
| State2 | SubscribedOrder | Subscribed Order |
| State3 | OrderReady | Order ready |
| State4 | OrderDispatched | Order Dispatched |
| FinalState | OrderCompleted | Order Completed |
- Link the states with transitions: To define a transition, click Transition on the Palette and then drag from the source state to the target state. Perform this for five transitions between the states in the order shown in the above table. Don't worry about naming the transitions yet.
- Arrange the diagram: Starting with CandidateOrder, move the states into a logical order, as shown in Figure 6 below.
Whilst the life cycle is now defined, what triggers the transitions is not defined, and the default is for them to be automatic. In this case, automatic is not the desired behavior, so you need to define the trigger for the transitions.
- Define the triggers: Right-click a transition and select Add UML => Trigger => Signal Event.
- A new menu should open. Select Create Signal Event.
- Another new menu should open. Select Create Signal and repeat this action for all the transitions, starting from the top and working down towards the Order Completed state.
- Rename the signals and apply labels to them. If there is no label present, then Studio will use the name when generating the configuration files, but labels are more flexible because they allow spaces.
- Define labels for and rename the signals: To define the signals label, expand CafeAndBrokerScenario => Models => <<LifecycleModel>> LifecycleDefinition, and click on <<LifecycleSignal >> Signal1. Then open the Properties view at the bottom of the screen.
- From the General tab, you can rename the signal, and from Stereotypes you can edit the label. Set the following labels and names for all the signals:
Names and labels for signals
| Signal name | Label | New name |
|---|---|---|
| Signal1 | Submit Order | Submit |
| Signal2 | Subscribe to Order | Subscribe |
| Signal3 | Fulfill Order | Fulfill |
| Signal4 | Dispatch Order | Dispatch |
| Signal5 | Pay for Order | Pay |
- This finished life cycle should look like Figure 6 below. Save the life cycle: Click File => Save. The life cycle is now finished and you can now assign the previously defined, business-modelled types to it, which will mean that they will be automatically governed into the life cycle when created.
Figure 6. Completed life cycle diagram

- Click on the OrderModel Business Model Diagram tab, then right-click on Doughnut ,and click Edit Life Cycle Assignment. In the dropdown, select Order Life Cycle and click OK.
- Repeat for Pasty and IcedBun. A small icon appears below each class to indicate that it has been assigned to a life cycle, as shown in Figure 7:
Figure 7. Icon denoting life cycle assignment

- You are ready to create the classification system: Right-click CafeAndBakerScenario and select New=> WSRR Classification System. In the resulting wizard, fill in the following values:
Classification system creation dialog inputs
| Field | Description | Input |
|---|---|---|
| UML Package name | File name of the classification system model -- must be unique in the project. | OrderClassification |
| Base URI | URI to uniquely identify this model. It should start with a URI scheme, such as . http:// | http://ibm.com/Scenario/Classifications |
| Label | Used by in the Web UI only when referring to the classification system in the Configuration perspective and in Business Space when displaying the classification as a property. | Priority |
| Comment | Purely a comment | Optional |
| Target configuration project | Project where the model will be created. | CafeAndBakerScenario |
- Create four new classes on the canvas: Drag Class from the palette on the right side onto the canvas four times. Alternatively, you can click Class and then click on the canvas instead of dragging.
- Rename these classes: Click on the automatically assigned name until it is highlighted (it may take several clicks), and then type over the old name to rename each class.
- With a class selected, open the Properties view at the bottom of the screen and navigate to the Stereotypes tab, where you can set the label. Rename each class and apply their labels as shown below:
Old and new names for classes in the classification system.
| Original Name | New Name | Label |
|---|---|---|
| Class1 | Priority | Priority |
| Class2 | High | High Priority |
| Class3 | Medium | Medium Priority |
| Class4 | Low | Low Priority |
- The classification Priority must be specified as the super class to in order to establish the hierarchy, which you can do by using the Generalization relationship: Click Generalization on the palette and drag from Low Priority to Priority, thus making Priority the superclass. Repeat for Medium and Low Priority.
- Save the classification system: Click File => Save.
Figure 8. Priority classification system diagram

- The classification system is now complete and should look like Figure 8 above. Once again, you can generate the configuration to ensure that there are no errors: Right-click CafeAndBakerScenario and select Generate All WSRR Artifacts. If there were any errors during profile generation, the dialog box will open and the errors will be detailed in the Problems view at the bottom of the screen.
Exporting the WSRR configuration profile
At this stage, you are almost ready to export the profile from Studio to the WSRR server. But first you must define the WSRR Server in Studio:
- Switch to the WSRR Locations view at the bottom of the screen, then right-click and select Add WSRR Location. In the resulting wizard, fill in the values shown below (inputs in italics will be specific to your environment and are given here as a guide):
Add WSRR location wizard inputs
| Field | Description | Input |
|---|---|---|
| Alias name | A local name, used only in Studio to refer to the server | such as . My cafe and baker scenario server |
| Description | Somewhere extra details about the server can be written, perhaps which environment it is in. | Optional |
| Protocol | A choice of HTTP or HTTPS, depending on if your server is secure. In our case, you should be using a secure server as we're going to be using different users for different roles, such as . cafe users and baker users. | HTTPS |
| hostname | Hostname of the machine running your WSRR server, including (if required), the domain. | localhost |
| Port | HTTP(S) port of the WSRR Server. The default for HTTP is 9080 and for HTTPS is 9443. When you selected HTTPS it will have changed the value to the default HTTPS port. | 9443 |
| User ID | Username of the administrative user of WSRR. The user must have J2EE Administrator permissions for the WSRR Application. | wasadmin |
| Password | Admin user's password. | |
| Key Store and Trust Store parameters | These settings refer to the certificate stores for SSL communication with WSRR server. In normal circumstances these can be left as default. See your security specialist if you are concerned about these settings. | |
| Context Root Prefix | If multiple WSRR instances are deployed within a cell, they can all be served by the same HTTP server, and a prefix can be used to uniquely identify them. If this means nothing to you, leave it blank. | |
| Update interval | Time interval in seconds when Studio refreshes its information on which profiles are deployed and which one is active on the server. | 300 |
| Connection timeout | Time in seconds that Studio will wait after attempting an operation in WSRR before giving up waiting. The operation itself will still continue. Loading and activating a profile can be a slow process, and if the hardware running the WSRR server is not very fast, then the operation is liable to time out. Therefore it is good idea to increase this value from the default of 300. | 600 |
Figure 9. Completed Add WSRR Location wizard

- Click Test Connection.
- Assuming that you're working with a secured WSRR, you will be prompted to accept the certificate of the WSRR server. Review the certificate and accept it by clicking Accept.
- If the connection was successful, click OK to dismiss the success message and click Finish to save the location. If the test connection failed, correct the problem and try again.
- You are now ready to export the profile: Right-click on the newly defined location in the WSRR Locations view and select Export WSRR Configuration Profile.
- Assuming you had the CafeAndBakerScenario configuration project selected in the WSRR Configuration Project Explorer, it should already be selected in the Configuration Project dropdown. If it is not, then select it. You should have a wizard that looks like Figure 10. When exporting, you also need to activate it.
Figure 10. Completed Export WSRR Configuration wizard.

- Check the checkbox by Activate profile and then click Finish.
- When you export the profile, Studio first regenerates and validates the profile, then exports the profile to the server and optionally makes it the active profile.
In this article you have been introduced to some of the key features of WSRR Studio. You have created business models and specified details such as labels and multiplicity. You have defined a custom life cycle and assigned your business models to be automatically entered into it. You also created a classification system and finally exported the WSRR configuration profile directly into a WSRR server and activated it. In Part 2 of this article series, you will learn how to create governance policies and translatable messages, and how to configure access controls.
| Description | Name | Size | Download method |
|---|---|---|---|
| Completed WSRR configuration profile | CafeAndBakerScenario.zip | 2.1 MB | HTTP |
| Completed WSRR Studio project archive.1 | CafeAndBakerProject.zip | 10.0 MB | HTTP |
Information about download methods
Note
- Import CafeAndBakerProject.zip as a existing project from an archive.
- WebSphere Service Registry and Repository resources
- WebSphere Service Registry and Repository information center
A single Web portal to all WebSphere Service Registry and Repository documentation, with conceptual, task, and reference information to help you install, configure, and use the product. - Getting started with WebSphere Service Registry and Repository
This developerWorks article shows you how to populate WebSphere Service Registry and Repository with existing Web services information. - WebSphere Service Registry and Repository product page
Product descriptions, product news, training information, support information, and more. - WebSphere Service Registry and Repository Information
Portal
This wiki provides an alternative portal for quick access to a wide variety of WebSphere Service Registry and Repository resources, and also makes it easy for you to give feedback on the product. - WebSphere Service Registry and Repository requirements
Hardware and software requirements. - WebSphere Service Registry and Repository support
A searchable database of support problems and their solutions, plus downloads, fixes, and problem tracking. - WebSphere Service Registry and Repository Handbook
This IBM Redbook discusses the architecture and functions of Service Registry, along with sample integration scenarios that you can use to implement Service Registry in an SOA.
- WebSphere Service Registry and Repository information center
- WebSphere resources
- developerWorks WebSphere developer resources
Technical information and resources for developers who use WebSphere products. developerWorks WebSphere provides product downloads, how-to information, support resources, and a free technical library of more than 2000 technical articles, tutorials, best practices, IBM Redbooks, and online product manuals. - developerWorks WebSphere application connectivity developer resources
How-to articles, downloads, tutorials, education, product info, and other resources to help you build WebSphere application connectivity and business integration solutions. - developerWorks WebSphere business process management developer resources
WebSphere BPM how-to articles, downloads, tutorials, education, product info, and other resources to help you model, assemble, deploy, and manage business processes. - developerWorks WebSphere SOA and Web services developer resources
How-to articles, downloads, tutorials, education, product info, and other resources to help you design and build WebSphere SOA and Web services solutions. - Most popular WebSphere trial downloads
No-charge trial downloads for key WebSphere products. - WebSphere forums
Product-specific forums where you can get answers to your technical questions and share your expertise with other WebSphere users. - WebSphere on-demand demos
Download and watch these self-running demos, and learn how WebSphere products and technologies can help your company respond to the rapidly changing and increasingly complex business environment. - developerWorks WebSphere weekly newsletter
The developerWorks newsletter gives you the latest articles and information only on those topics that interest you. In addition to WebSphere, you can select from Java, Linux, Open source, Rational, SOA, Web services, and other topics. Subscribe now and design your custom mailing. - WebSphere-related books from IBM Press
Convenient online ordering through Barnes & Noble. - WebSphere-related events
Conferences, trade shows, Webcasts, and other events around the world of interest to WebSphere developers.
- developerWorks WebSphere developer resources
- developerWorks resources
- Trial downloads for IBM software products
No-charge trial downloads for selected IBM® DB2®, Lotus®, Rational®, Tivoli®, and WebSphere® products. - developerWorks blogs
Join a conversation with developerWorks users and authors, and IBM editors and developers. - developerWorks tech briefings
Free technical sessions by IBM experts to accelerate your learning curve and help you succeed in your most challenging software projects. Sessions range from one-hour virtual briefings to half-day and full-day live sessions in cities worldwide. - developerWorks podcasts
Listen to interesting and offbeat interviews and discussions with software innovators. - developerWorks on Twitter
Check out recent Twitter messages and URLs. - IBM Education Assistant
A collection of multimedia educational modules that will help you better understand IBM software products and use them more effectively to meet your business requirements.
- Trial downloads for IBM software products

Stephen Willoughby is a Solution Test Specialist on the WebSphere Service Registry and Repository team. He joined IBM in 2000 as a student and then again as a graduate in 2002. In 2006 he joined the WebSphere Service Registry and Repository team has been a tester there ever since. You can contact Stephen at stephen.willoughby@uk.ibm.com.




