wsrr

204
Discovering the Value of WebSphere Service Registry and Repository V8.0 Lab Exercises

Upload: marcel-an

Post on 31-Dec-2015

141 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: WSRR

Discovering the Value of WebSphere Service Registry and Repository V8.0 Lab Exercises

Page 2: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 2 Discovering the Value of WebSphere Service Registry and Repository

LAB 1 PUBLISHING, FINDING, AND GOVERNING SERVICES USING WEBSPHERE SERVICE

REGISTRY AND REPOSITORY .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 1.1 INTRODUCTION TO WEBSPHERE SERVICE REGISTRY AND REPOSITORY ........................................................ 4 1.2 LAB SCENARIO ........................................................................................................................................ 4 1.3 LAB SETUP.............................................................................................................................................. 6 1.4 CREATE BUSINESS SPACES FOR USER ROLES ........................................................................................... 8 1.5 CREATE AND GOVERN AN ACCOUNT CREATION BUSINESS SERVICE ........................................................... 11 1.6 CREATE AND GOVERN AN ACCOUNT CREATION SERVICE VERSION............................................................. 26 1.7 REVIEW CHARTS IN THE SERVICE REGISTRY – DEVELOPMENT SPACE ........................................................ 36 1.8 DESIGN AND ELABORATE THE ACCOUNT CREATION SERVICE VERSION ....................................................... 39 1.9 VIEW CONSUMERS AND PROVIDERS IN THE SERVICE CONSUMPTION VISUALIZER......................................... 53 1.10 REGISTER AN EXISTING REST SERVICE .................................................................................................. 56 1.11 REGISTER THE ELIGIBILITY REST SERVICE ENDPOINT .............................................................................. 68 1.12 LAB REVIEW.......................................................................................................................................... 76

LAB 2 CUSTOMIZING WEBSPHERE SERVICE REGISTRY AND REPOSITORY USING STUDIO .... . . . . . . . . 77 2.1 INTRODUCTION TO WEBSPHERE SERVICE REGISTRY AND REPOSITORY STUDIO .......................................... 77 2.2 LAB SCENARIO ...................................................................................................................................... 77 2.3 OPEN AN EXISTING CONFIGURATION PROFILE PROJECT............................................................................ 78 2.4 USE THE WSRR STUDIO GRAPHICAL UML MODELING TO VIEW A CLASSIFICATION SYSTEM ........................ 79 2.5 USE THE WSRR STUDIO GRAPHICAL UML MODELING TO VIEW A LIFECYCLE ............................................. 80 2.6 USE THE WSRR STUDIO GRAPHICAL UML MODELING TO VIEW A BUSINESS MODEL................................... 82 2.7 CREATE GOVERNANCE POLICIES ON A LIFECYCLE TRANSITION .................................................................. 84 2.8 GENERATE THE WSRR CONFIGURATION PROFILE ARTIFACTS................................................................. 100 2.9 SYNCHRONIZE THE PROFILE WITH WSRR.............................................................................................. 102 2.10 INTERACT WITH THE NEW APPLICATION BUSINESS MODEL IN THE BUSINESS SPACE................................... 106 2.11 LAB REVIEW........................................................................................................................................ 121

LAB 3 REPORTING ON SERVICES AND RELATED METADATA USING WEBSPHERE SERVICE REGISTRY AND REPOSITORY STUDIO.... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 3.1 INTRODUCTION TO REPORTING FOR WEBSPHERE SERVICE REGISTRY AND REPOSITORY ........................... 122 3.2 LAB SCENARIO .................................................................................................................................... 122 3.3 OPEN AN EXISTING CONFIGURATION PROFILE PROJECT.......................................................................... 123 3.4 CREATE A SIMPLE REPORT................................................................................................................... 124 3.5 PUBLISH THE REPORT TO WSRR.......................................................................................................... 139 3.6 VIEW THE REPORT FROM THE BUSINESS SPACE ..................................................................................... 142 3.7 EXPORT THE REPORT IN VARIOUS FORMATS .......................................................................................... 147 3.8 REFERENCES TO GET MORE INFORMATION ON REPORTS. ......................................................................... 148 3.9 LAB REVIEW........................................................................................................................................ 148

LAB 4 DEFINING A WEBSPHERE MQ APPLICATION TO WEBSPHERE SERVICE REGISTRY AND REPOSITORY .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 4.1 LAB SCENARIO .................................................................................................................................... 149 4.2 GENERATE A WSDL USING THE WEBSPHERE MQ SERVICE DEFINITION WIZARD ...................................... 150 4.3 START WSRR AND CREATE A BUSINESS SPACE .................................................................................... 156 4.4 LOAD THE MQ ARTIFACTS INTO WSRR ................................................................................................. 159 4.5 BROWSE THE MQ ARTIFACTS IN WSRR................................................................................................ 168 4.6 LAB REVIEW........................................................................................................................................ 173

LAB 5 IMPLEMENTING VERSION CONTROL WITH WEBSPHERE SERVICE REGISTRY AND REPOSITORY AND WEBSPHERE MESSAGE BROKER .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 5.1 INTRODUCTION TO INTEGRATING WEBSPHERE MESSAGE BROKER WITH WEBSPHERE SERVICE

REGISTRY AND REPOSITORY................................................................................................................. 175 5.2 LAB SCENARIO..................................................................................................................................... 175 5.3 START WSRR AND CREATE A BUSINESS SPACE .................................................................................... 177 5.4 IMPLEMENT SERVICE VERSIONING WITH WMB AND WSRR..................................................................... 181 5.5 LAB REVIEW........................................................................................................................................ 195 5.6 OPTIONAL EXPLORATIONS..................................................................................................................... 196

APPENDIX A. NOTICES .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 APPENDIX B. TRADEMARKS AND COPYRIGHTS .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

 

Page 3: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 3

Page 4: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 4 Discovering the Value of WebSphere Service Registry and Repository

Lab 1 Publishing, Finding, and Governing Services using WebSphere Service Registry and Repository

1.1 Introduction to WebSphere Service Registry and Repository

IBM WebSphere Service Registry and Repository (WSRR) is an industrial-strength platform that helps you get the most business value from your services by enabling better management and governance. It provides robust registry and repository capabilities and can be tightly integrated with the IBM SOA Foundation.

WSRR allows the governance architect or administrator to customize entities (system and business models) as well as the properties, life cycles, relationships and classifications that constitute a service environment. In addition, WSRR provides role-based access control and unique role-based user perspectives for users performing governance tasks. This collection of configuration artifacts and models constitutes the services governance environment and is represented within WSRR as a configuration profile.

WSRR includes a configuration profile out of the box called the Governance Enablement Profile (GEP).

The Governance Enablement Profile or GEP provides a cohesive set of models and assets including a complete governance process for working with services from initial business need through to deployment. For more detailed information on the GEP, refer to the product information center link:

http://publib.boulder.ibm.com/infocenter/sr/v7r5/topic/com.ibm.sr.doc/cwsr_gep.html

and the Service Lifecycle Governance with IBM WebSphere Service Registry and Repository redbook, SG24-7793:

http://www.redbooks.ibm.com/redbooks/pdfs/sg247793.pdf

1.2 Lab Scenario

Our fictional customer, The Supply Company has standardized on WebSphere Service Registry and Repository (WSRR) as the services registry for their SOA. Implementing WSRR as the registry component of their SOA Governance infrastructure will meet their requirement for having a platform that will support the governing evolution of a service.

WSRR will be The Supply Company’s master metadata repository for service interaction endpoint descriptions. By implementing WSRR The Supply Company will be able to establish a central component for finding and managing service metadata.

Using WSRR, The Supply Company will realize the following benefits:

• Controlled visibility of services and related service metadata by user role

• Publish, find, and govern all types of services including RESTFul services

• Management of multiple service versions

Page 5: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 5

• Automatic notification of changes to services

• Customized service governance model to meet The Supply Company’s organizational needs

• Impact analysis to determine consumers for a service version

• Charts and reports to measure the effectiveness of your SOA

• Runtime support for Enterprise Service Bus (ESB) integration patterns, including

• Dynamic endpoint selection

• Contract/ Service Level Agreement (SLA) enforcement

The Supply Company needs to implement a governance solution that matches its unique organizational governance requirements. The Supply Company has chosen to utilize the GEP as a starting point for their service governance environment so that they can take advantage of the SOA governance model that is provided by IBM.

Section Steps:

The objectives of this section are to:

• Learn how to configure the WebSphere Service Registry and Repository Web 2.0 user interface for different SOA user roles

• Learn how to use the WebSphere Service Registry and Repository Web 2.0 user interface to effectively find, publish, and govern your services.

• Leverage charts in the Web 2.0 user interface to determine the effectiveness of your SOA

• Leverage the Web 2.0 user interface to determine all consumers of a service

• Learn how to govern and manage RESTFul services using WebSphere Service Registry and Repository

The steps you will perform in this section are:

• Create business spaces for user roles

• Create and govern an account creation business service

• Create and govern an account creation service version

• Review charts in the Service Registry – Development space

• Design and elaborate the account creation service version

• View consumers and providers in the Service Consumption Visualizer

• Create a REST service

Page 6: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 6 Discovering the Value of WebSphere Service Registry and Repository

• Register a REST service endpoint in the Service Registry – Operations space

1.3 Lab Setup

In this section, you will set up your environment, which is starting the server. Below are the environment specific settings for the VMWare environment used by this lab.

Password information

VMWare User: Administrator

Password: passw0rd

WAS admin User: wasadmin

Password: passw0rd

DB2 admin User: db2admin

Password: passw0rd

Names and locations of server processes, workspaces, etc.

server1

Base-Win2k8x64:9443

(Application Server)

WSRR Studio workspace name C:\IBM\WSRRStudio\workspace

URLs

Business Space https://base-win2k8x64:9443/mum/resources/bootstrap/login.jsp

WSRR Console https://base-win2k8x64:9443/ServiceRegistry/logon.jsp

WAS Admin Console https://base-win2k8x64:9043/ibm/console/logon.jsp

Page 7: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 7

Ensure the environment is started for this lab by performing the steps below.

__1. Ensure DB2 is started

__a. On the right hand-side of the taskbar, click the arrows as show below and click on the DB2 database icon as shown.

__b. If Start (DB2) is grayed out on the popup menu, then DB2 IS started. If not, select Start (DB2) and wait a few minutes for the DB2 instance to start.

__2. Start WebSphere Service Registry and Repository

__a. Click the shortcut Start the Server to start WebSphere Service Registry and Repository that is hosted in WebSphere Application Server.

__b. This will bring up a window. The window will display startup information.

Page 8: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 8 Discovering the Value of WebSphere Service Registry and Repository

Wait until the window indicates the server has started.

__c. The window will close automatically after startup has completed.

1.4 Create Business Spaces for User Roles

In this section, you will create business spaces for the Business, Developer, SOA Governance, and Operations roles and a space for Policy Analytics. A space contains a set of pages with widgets on each page to retrieve and update content. WebSphere Service Registry and Repository ships with five pre-configured templates: Service Registry for Business, Service Registry for Development, Service Registry for Operations, Service Registry for SOA Governance, and Service Registry Policy Analytics. Each of these templates contains a pre-configured set of pages and widgets to interact with WebSphere Service Registry and Repository.

__1. Create a Service Registry for Business Space

In this section, you will create a business space based off of the Service Registry for Business template.

__a. Launch the Firefox browser and click on the Business Space bookmark.

__b. Authenticate to WSRR as needed. Enter a username of wasadmin and password of passw0rd. Click the Login button.

Page 9: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 9

__c. Click the Manage Spaces link.

__d. Click the Create Space button.

__e. On the Create Space popup, enter Service Registry – Business for the space name, click the Create a new space using a template radio button, and select the Service Registry for Business option from the template drop down list. Select the Business Design space style and space icon as shown below. Click the Save button.

Page 10: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 10 Discovering the Value of WebSphere Service Registry and Repository

Each space can have its own unique look and feel using space styles.

__f. Repeat steps d-e above to create four additional spaces named in the table below and based off the corresponding space template. For each space you create, you may use whatever space style and space icon you prefer.

Space Name Template Name Service Registry – Development Service Registry for Development Service Registry – Operations Service Registry for Operations Service Registry – SOA Governance Service Registry for SOA Governance Service Registry – Policy Analytics Service Registry Policy Analytics

__g. When complete, you should have the following list of spaces. Note: the space icon to the left of each space name may differ depending on your personal preference for what you selected for space style and icon. Click the Done button.

Page 11: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 11

Session Inactivity If you receive a prompt to re-authenticate while working in the Web browser, this means you have perhaps been inactive on a panel for perhaps an extended amount of time and have exceeded a session inactivity setting. You will need to enter the login credentials of wasadmin for user ID and passw0rd for the password in order to re-authenticate and proceed.

1.5 Create and Govern an Account Creation Business Service

In this section, you create a business service for the Account creation service and approve the business service. A business service represents a business capability that is viewed as a service within the organization. A business capability in the governance enablement profile expresses a generalized capability within the SOA organization. Each business capability plays a particular role in the business processes of the organization and is therefore the starting point for traceability, from business to IT, in an SOA environment. We will use the Service Registry – Business space to initially create the business service.

Page 12: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 12 Discovering the Value of WebSphere Service Registry and Repository

Note, for each user role we are using the same user id for simplicity – wasadmin.

__1. Create an Account Creation Business Service

__a. Click the Go to Spaces link.

__b. Click the Service Registry – Business link.

__c. Ensure you are on the Overview page. The first page of a space is the default when navigating to a new space.

Each space consists of a set of pages and widgets within each page. The widgets are containers within each page that interact with WebSphere Service Registry and Repository to retrieve and update service data. Widgets may be wired to each other to use output from one widget as input for another widget. In the Service Registry – Business space, there are five pages named Overview, Browse, Graph, Consumers and Providers, and Charts and Reports. On the left of the Overview page are a Collection View widget named Approved Business Capabilities and a widget named Watch List – Service Registry Collection. On the right from top to bottom is a Search widget, Service Registry actions widget, a Graph widget, and a Web site widget for reference documentation.

Page 13: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 13

__d. On the Service Registry Actions widget, click the Create a Business Service link.

__e. On the Create a Business Service panel, enter a name of Account creation service and a description as shown below. Click the Add Other Document link to add a charter or a document that describes the business justification for this service.

Page 14: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 14 Discovering the Value of WebSphere Service Registry and Repository

__f. Click the Load button to browse for and load a new charter document.

__g. Click the Browse button to browse the file system for the charter document.

The Load Documents wizard allows you to load any type of document into WebSphere Service Registry and Repository including binary documents and multi-part WSDL and XSD files. You will see later in this lab, how to load a multi-part WSDL file.

Page 15: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 15

__h. On the file upload panel, browse to C:\Labfiles\GEP_Tutorials and select the AccountCreationServiceCharter.doc document and click the Open button.

Page 16: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 16 Discovering the Value of WebSphere Service Registry and Repository

__i. Click the Next button on the Load Documents panel.

__j. Click the Finish button on the Load Documents panel.

Page 17: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 17

__k. Finally, click the Finish button on the Create a Business Service panel.

Page 18: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 18 Discovering the Value of WebSphere Service Registry and Repository

__2. Propose the Account Creation Business Service for Charter Review

__a. Once the Account creation service has been created you are automatically positioned to the Browse page.

The service is displayed in the Collection widget and details about the service are displayed in the Details widget on the right hand side.

__b. Propose the Account creation service for Charter Review by selecting Propose Charter from the drop down list within the Details widget.

Page 19: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 19

__c. Click the OK button to dismiss the Operation Successful popup.

__d. The Account creation service is now in the Charter Review state. You can hover over the information icon to get a description of the Charter Review state.

Page 20: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 20 Discovering the Value of WebSphere Service Registry and Repository

__3. Review and Approve the Account Creation Business Service Charter

The SOA governance team is responsible for ensuring that governance processes are enforced. Before the business service can be transitioned to the next stage in the life cycle, the team must ensure that the proposed capability does not duplicate other services in the registry, and that an owning organization is assigned that will be responsible for all versions of this capability, and for managing requirements for this service. We are assuming you are in a SOA Governance user role here despite using the same user id.

__a. Select Go to Spaces tab from the top left of the Business Space navigation bar and click the Service Registry – SOA Governance link.

__b. The Watch list should have the Account creation service in its list. If the service does not appear, click the arrow as shown and select Refresh from the menu popup. Hover over the Account creation service link.

Page 21: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 21

__c. By hovering over the Account creation service, you can get basic information about the item in the list. Click on the View Details link.

__d. From the Details widget, attempt to approve the charter by selecting Approve Charter from the menu drop down list.

Page 22: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 22 Discovering the Value of WebSphere Service Registry and Repository

__e. A user error message is displayed indicating that an owning organization has not been assigned to this business service. Click the OK button to dismiss the popup.

__f. Click the Edit icon on the Details widget.

Page 23: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 23

__g. Click the Add Organization link on the Details widget.

__h. Enter a “C” into name and select Commercial from the drop down list.

Page 24: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 24 Discovering the Value of WebSphere Service Registry and Repository

__i. Click the Finish button.

Page 25: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 25

__j. Under Action, select Approve Charter.

Page 26: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 26 Discovering the Value of WebSphere Service Registry and Repository

__k. This time you are able to pass the governance policy check since you have assigned an owning organization. Click OK to dismiss the popup.

1.6 Create and Govern an Account Creation Service Version

In this section, you create a service version for the Account creation service and load related technical documents for the service version. After the business capability has been defined, reviewed, and approved, as described in the previous section, it is now the responsibility primarily of the development organization to create an implementation of the service. We will use the Service Registry – Development space to initially create the service version.

Page 27: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 27

Note, for each user role we are using the same user id for simplicity – wasadmin.

__1. Create an Account Creation Service Version

__a. Click the Go to Spaces link.

__b. Click the Service Registry – Development link.

__c. The Watch list should have the Account creation service in its list. If the service does not appear, click the arrow as shown and select Refresh from the menu popup. Click the Account creation service link.

Page 28: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 28 Discovering the Value of WebSphere Service Registry and Repository

__d. Click the Edit icon on the Details widget.

__e. Click the Add Capability Version link.

Page 29: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 29

__f. Enter Account creation service for the name and select Service Version. Click the Create button. Note, we probably could have been more consistent and named the business service Account creation without the “service” behind it while naming the actual service version Account creation service.

Page 30: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 30 Discovering the Value of WebSphere Service Registry and Repository

__g. Enter a description for the service version as shown below and a version number of 1.0. Use the date selector next to Version Availability Date to select a date into the future.

Page 31: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 31

__h. Click Add Organization.

__i. Enter a “C” into the name and select Commercial. Click the Finish button

Page 32: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 32 Discovering the Value of WebSphere Service Registry and Repository

__j. Click the Finish button on the business service panel.

Page 33: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 33

__k. The Service Registry Navigator widget shows a quick one-up/one-down view of the relationships with the entry we are viewing in the details widget, in this case, the Account creation service business service.

Page 34: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 34 Discovering the Value of WebSphere Service Registry and Repository

__2. Propose and Approve the Scope for the Account Creation Service Version

Now that the scope of the service version is defined, it must be put out for review. This is so that all potential consumers of the service can verify that their requirements are within the scope that is being proposed by the development team. In the Scope Review state, the SOA governance team reviews the service version requirements and carry out the following checks:

• That this service version is warranted across the organization.

• That the requirements and stakeholders have been agreed.

• That the owning organization, responsible for delivering the requirements, has been identified, and assigned to the service version.

When the service version scope review is complete, the scope is approved. We are not going to go thru the complete service version governance lifecycle.

__a. Click the Account creation service service version in the navigator widget.

__b. From the Actions menu on the Details widget, select Propose Scope. Click the OK button on the Operation Successful popup.

Page 35: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 35

__c. From the Actions menu on the Details widget, select Approve Scope. Click the OK button on the Operation Successful popup.

Page 36: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 36 Discovering the Value of WebSphere Service Registry and Repository

1.7 Review Charts in the Service Registry – Development Space

Now that the Account creation service version has been placed in the Scoped state, lets review some of the existing charts in the Service Registry - Development space.

__1. Review the Charts in the Development Space

__a. Select the Overview tab.

__b. Click the Pie chart icon on the Versions by Governance state chart to view the graph as a pie chart.

Page 37: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 37

Notice we have a service version in the Scoped state which is the Account creation service that we created earlier and service versions in the Operational state, one of which is an existing Account eligibility service that will be consumed by the Account creation service. The Services by Owning Organization chart shows we have one service that belongs to Commercial, which represents the Account creation service, and one service that belongs to Common Services, which represents the Account eligibility service.

__2. Edit Chart Settings in the Development Space

__a. Click the Edit Page link near the top right of the space page.

__b. On the Versions by Governance State chart, select the down arrow, and select Edit Settings from the popup menu.

Page 38: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 38 Discovering the Value of WebSphere Service Registry and Repository

__c. The chart displayed by the widget, can be selected from a drop down list. For now, we will not change anything. Click the Close box.

__d. Click the Finish Editing link.

__3. View Interaction between Chart and Collection Widget

__a. Click inside the Scoped section of the Versions by Governance State pie chart.

Page 39: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 39

__b. Right above the chart, the Collection widget displays a list of all service versions in the Scope governance state.

The charts are wired to the Collection widget to show the data behind a section in the chart.

1.8 Design and Elaborate the Account Creation Service Version

When the assets that represent the interface and schema for this version of the service have been defined, the development team must design the service implementation, taking into account the binding protocols and endpoints that will be exposed. To do this, a service implementation, that is compliant with a WSDL defining the service and binding elements, must be developed and tested. At this stage of

Page 40: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 40 Discovering the Value of WebSphere Service Registry and Repository

development, any endpoint values will be temporary, so although endpoint values must be present, the values would not be expected to be used in a real situation. This definition allows the development process to continue by providing more detailed information as to the specific service implementation. In this case, the service endpoint is defined as a SOAP web service. A dummy endpoint document, that specifies the port name and namespace details, is created and loaded.

__1. Load the WSDL Documents for the Account Creation Service Version

__a. Select the Overview tab.

__b. Click the Load Documents link on the Service Registry Actions widget.

__c. Click the Browse button on the Load Documents panel.

Page 41: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 41

__d. On the File Upload dialog, navigate to C:\Labfiles\GEP_Tutorials and select the AccountCreationDevelopmentEndpoint.wsdl file. Click the Open button.

Page 42: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 42 Discovering the Value of WebSphere Service Registry and Repository

__e. On the Load Documents panel, enter a description as shown and enter 1.0 for Document version. Click the Next button.

__f. Since this is a multi-part WSDL, the next panel is prompting for any WSDL or XSD files that are imported. Click the Add link next to AccountCreationInterface.wsdl.

Page 43: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 43

__g. Use the browse button to navigate to the same directory as before and select the AccountCreationInterface.wsdl file. Enter 1.0 for Document version. Click the OK button.

Page 44: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 44 Discovering the Value of WebSphere Service Registry and Repository

__h. Repeat steps f-g to select and load the AccountCreationSchema.xsd file.

Page 45: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 45

__i. Now that all the dependant artifacts have been accounted for, the Finish button is now enabled. Click the Finish button.

__j. Click the Close button on the Summary panel.

Page 46: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 46 Discovering the Value of WebSphere Service Registry and Repository

__2. Link the Specifications for the Account Creation Service Version

__a. Click the Account creation service (1.0) link in the Collection widget.

__b. Click the Edit icon in the Details widget.

Page 47: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 47

__c. Click the Add Service link under Provided Web Services.

Page 48: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 48 Discovering the Value of WebSphere Service Registry and Repository

__d. Enter an “A” into name and select AccountCreationService-Development.

This service name was provided in the WSDL files that you loaded previously.

__3. Establish a Service Level Agreement with the Eligibility Service

Page 49: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 49

Since the Account creation service version is going to consume the Eligibility service, we need to establish a service level agreement. We will establish a service level agreement to the appropriate service level definition (SLD) for the Eligibility service version. The SLD specifies non-functional requirements for interacting with the provided service version. The diagram below illustrates how the service level agreement from the consumer (on the right) references a service level definition from the provider (on the left). “Capability Version” in the diagram represents a service version from either the consumer or provider’s perspective in our scenario. In our scenario, the service consumer is the Account creation service version and the service provider is the Eligibility service version.

__a. Click the Add Service Level Agreement link. Make sure you are in the details for the Account creation service version.

Page 50: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 50 Discovering the Value of WebSphere Service Registry and Repository

__b. Enter the name, SLA – Account Creation Consumption of Eligibility Service, select Extended Service Level Agreement from the drop down list, and click the Create button. Be sure to select Extended Service Level Agreement and not Service Level Agreement.

__c. Provide values for the Description, Subscription Availability Date and message requirements fields below. Any values are acceptable for this exercise.

Page 51: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 51

__d. Click the Add Service Level Definition link under Agreed Endpoints.

Note, from your SLA you are creating for your Account creation service version, you are adding a reference to the service level definition for the service version you want to consume; in this case, a reference to a SLD for the Account eligibility service version.

__e. Enter a “S” and select SLD – Account eligibility.

This represents the service level definition for the service version we are going to consume – Account eligibility. This service level definition was already created for you.

Page 52: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 52 Discovering the Value of WebSphere Service Registry and Repository

__f. Click the Finish button on the Extended Service Level Agreement panel.

__g. Click the Finish button on the Account creation service version panel.

Page 53: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 53

1.9 View Consumers and Providers in the Service Consumption Visualizer

Now that the service level agreement has been established between the Account creation service and Eligibility service, you will use a Service Consumption Visualizer widget to view the relationship. The widget is very useful for determining who are the consumers of a service. Also, from the provider’s standpoint, the widget quickly answers the question, “What services do I consume”.

__1. View Consumers and Providers

__a. Select View Consumers and Providers from the Action drop down list on the Details widget.

Page 54: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 54 Discovering the Value of WebSphere Service Registry and Repository

__b. Since you ran the Service Consumption Visualizer while in the Account creation service version details, Account eligibility is displayed as a provider for the Account creation service.

Page 55: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 55

__c. Hovering over the line between the consumer and the provider shows a popup with the service level agreement information.

Page 56: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 56 Discovering the Value of WebSphere Service Registry and Repository

1.10 Register an Existing REST Service

The development organization within Common Services had an existing REST implementation for the Eligibility service. In this section, you will register the REST service and the corresponding REST interface.

The use of REST for interactions between consumers and providers has become more commonly used. There are many competing specifications available for representing REST in the marketplace. The REST model is not a representation of any single specification; instead it represents the concepts relevant to governance. WSRR provides guidance about how to govern REST systems and is flexible enough that you can do what you need to do with that representation. REST is represented in the following ways:

• The description of the interface - The description can be modeled in detail using the format of one of the REST specifications, or it can be a simple text description contained in a governed document. The WSRR REST model implements a REST service interface.

• Representation of the endpoint - A REST service, like any other service, has an endpoint with a network address. This is modeled in the same way as all other endpoints in WSRR so that its state, whether online or offline, can be governed. The REST service can be queried by a runtime system; for example an ESB. The WSRR REST model represents this using a REST service endpoint.

• Realization of a Capability Version - In the same way that a Capability Version can be realized as a Web Service or an SCA Module, it can also be realized by a REST service. This enables a REST service to play a part in the complete governance story.

__1. Create Action List Items for REST Services

__a. Click the Overview tab on the Service Registry – Development space.

__b. Click the Edit Page link on the upper right of the space.

__c. On the Service Registry Actions widget, click the down arrow as shown below and select Edit Settings from the popup menu.

Page 57: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 57

__d. On the Service Registry Actions – Edit Settings popup, click the Create a New Action link.

__e. On the Create a New Action panel, enter Create REST Service for the Action Label and Description. Select Create a Business Object and REST Service from the dropdowns. Click the OK button.

Page 58: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 58 Discovering the Value of WebSphere Service Registry and Repository

__f. Repeat steps d-e entering Create REST Service Interface for the Action Label and Description. Select Create a Business Object and REST Service Interface from the dropdowns.

__g. On the Service Registry Actions – Edit Settings popup, click the Save and Close button.

Page 59: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 59

__h. Click the Finish Editing link near the top right.

__2. Create a REST Service Interface for the Eligibility Service

__a. Click the Create REST Service Interface link on the Service Registry Actions widget.

Page 60: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 60 Discovering the Value of WebSphere Service Registry and Repository

__b. Enter the values as shown below. Click the Add Other Document link.

__c. Enter “E” for name and select the EligibilityInterface.xml file from the drop down list.

__d. Click the Finish button.

Page 61: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 61

__3. Create a REST Service for the Eligibility Service

__a. Click the Overview tab on the Service Registry – Development space.

__b. Click the Create REST Service link on the Service Registry Actions widget.

Page 62: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 62 Discovering the Value of WebSphere Service Registry and Repository

__c. Enter the values as shown below. Click the Add REST Service Interface link.

Page 63: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 63

__d. Enter an “E” into name and select EligibilityRESTInterface from the drop down list.

__e. Click the Finish button.

__f. The EligibilityRESTService REST Service is successfully created.

Page 64: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 64 Discovering the Value of WebSphere Service Registry and Repository

__4. Realize the Eligibility Service Version - Add a Provided REST Service

__a. From the Search widget, select Service Version from the drop down list and click the Search button.

__b. Click the Eligibility Service (1.0) link on the Collection widget. If needed, use the pagination buttons located at the bottom of the widget to scroll thru addition data.

Page 65: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 65

__c. Click the Edit icon on the Detail widget.

Page 66: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 66 Discovering the Value of WebSphere Service Registry and Repository

__d. Click the Add Rest Service link under Provided REST Services.

__e. Enter an “E” into name and select EligibilityRESTService from the drop down list.

__f. Click the Finish button.

Page 67: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 67

__g. We now have both a Web service and REST service realization for the Eligibility Service Version. The REST realization is now part of the governed collection.

Page 68: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 68 Discovering the Value of WebSphere Service Registry and Repository

1.11 Register the Eligibility REST Service Endpoint

The I/T operations organization within Common Services will register the REST service endpoint for the Eligibility service. In this section, you will register the REST service endpoint using the Service Registry – Operations space.

__1. Create the Action List Item for Create REST Service Endpoint

__a. Click the Go To Spaces link and click the Service Registry – Operations link on the Go To Spaces Panel.

Page 69: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 69

__b. Click the Edit Page link on the upper right of the space.

__c. On the Service Registry Actions widget, click the down arrow as shown below and select Edit Settings from the popup menu.

Page 70: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 70 Discovering the Value of WebSphere Service Registry and Repository

__d. On the Service Registry Actions – Edit Settings popup, click the Create a New Action link.

__e. On the Create a New Action panel, enter Create REST Service Endpoint for the Action Label and Description. Select Create a Business Object and REST Service Endpoint from the dropdowns. Click the OK button.

Page 71: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 71

__f. On the Service Registry Actions – Edit Settings popup, click the Save and Close button.

Page 72: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 72 Discovering the Value of WebSphere Service Registry and Repository

__g. Click the Finish Editing link.

__2. Register the Eligibility REST Service Endpoint

__a. Click the Create REST Service Endpoint link on the Actions widget.

__b. Enter the values as shown below. Click the Add link next to Environment.

Page 73: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 73

__c. Check Production in the Environment panel. Click the Close button.

Page 74: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 74 Discovering the Value of WebSphere Service Registry and Repository

__d. Click the Finish button.

__3. View the Charts in the Service Registry - Operations Space

__a. Click the Overview tab on the Service Registry – Operations space.

__b. Scroll down and locate the charts on the right hand side. The Endpoint by Environment chart is updated to reflect the new REST production endpoint that we just added.

Page 75: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 75

__c. Click the Log out link on the upper right hand corner of the Business Space to log out.

You have completed this section using the new WSRR Business Space widgets features.

Page 76: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 76 Discovering the Value of WebSphere Service Registry and Repository

1.12 Lab Review

During this lab, you:

• Configured the WebSphere Service Registry and Repository Web 2.0 user interface for different SOA user roles

• Used the WebSphere Service Registry and Repository Web 2.0 user interface to effectively find, publish, and govern your services.

• Leveraged charts in the Web 2.0 user interface to determine the effectiveness of your SOA

• Leveraged the Web 2.0 user interface to determine all consumers of a service

• Published, governed and managed RESTFul services using WebSphere Service Registry and Repository

CONGRATULATIONS!

You have successfully completed Lab1 – Publishing, Finding, and Governing Services using WebSphere Service Registry and Repository

Page 77: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 77

Lab 2 Customizing WebSphere Service Registry and Repository using Studio

2.1 Introduction to WebSphere Service Registry and Repository Studio

WebSphere Service Registry and Repository (WSRR) Studio is standalone eclipse-based tool provided with WebSphere Service Registry and Repository. You can use the WSRR Studio application to configure WSRR Configuration Profiles and produce WSRR Reports. With WSRR Studio, you have the ability to visually model your business models, classification systems, and lifecycles using UML and to generate the related WSRR configuration items from the UML models.

The Unified Modeling Language (UML) is a general-purpose visual modeling language for systems. UML models the world as systems of interacting objects. Diagrams are windows or views into the model. There are nine different types of UML diagrams. In this lab you will work with two of the diagrams: namely the Class diagram and the StateMachine diagram. UML is extensible with the use of Stereotypes. Stereotypes allow you to introduce new modeling elements based on existing elements. Stereotypes are a way of extending the core semantics of the modeling language to express new things. Stereotypes are used in WSRR Studio for the WSRR Business Models. Classification Systems, and Lifecycle. These Stereotypes were added to facilitate modeling WSRR entities. When editing an object in a UML diagram, the Stereotype name is prefixed in front of the object name with the “<< >>”. When going thru the lab, you will see the Stereotypes designation applied to the specific type of model you are editing such as <<ClassificationSystemClass>>, <<LifecycleState>>, and <<BusinessModelClass>>.

2.2 Lab Scenario

The Supply Company needs to implement a governance solution that matches its unique organizational governance requirements. Fortunately, WSRR allows users to customize entities (system and business models) as well as the properties, life cycles, relationships, classifications, and service lifecycle governance policies that constitute a service environment.

In this section, you will learn how to use the new policy editor in WSRR Studio.

Section Steps:

The objectives of this section are to:

• Learn how to create custom service lifecycle governance policies using WebSphere Service Registry and Repository Studio

• Learn how to use synchronize customization changes in the Studio Eclipse workspace with the active configuration for the target WebSphere Service Registry and Repository server

• Experience the implementation of the custom service lifecycle governance policies using the WebSphere Service Registry and Repository Web 2.0 user interface

Page 78: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 78 Discovering the Value of WebSphere Service Registry and Repository

The steps you will perform in this section are:

• Use the WSRR Studio graphical UML modeling view a classification system.

• Use the WSRR Studio graphical UML modeling to view a lifecycle

• Use the WSRR Studio graphical UML modeling to view a business model.

• Use the WSRR Studio policy editor to create a governance policy on a lifecycle transition

• Generate the WSRR configuration profile artifacts

• Synchronize the generated WSRR configuration profile artifacts with the running WSRR instance active profile

• View and interact with the new application business model, lifecycle, classification and governance policies in the WSRR Business Space user interface

2.3 Open an Existing Configuration Profile Project

In this step you will open an existing WSRR configuration project in WSRR Studio.

__1. Launch WSRR Studio

__a. To start WSRR Studio, double click on the WSRR Studio icon on the desktop.

__b. If prompted with a workspace prompt, type or select C:\IBM\WSRRStudio\workspace and click the OK button.

Page 79: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 79

__c. The WSRR configuration project is opened. Expand My Governance Enablement Profile. You will see the folders for Diagrams, Models, Reports, and Configuration Profile Files.

2.4 Use the WSRR Studio Graphical UML Modeling to View a Classification System

In this step, you will review the classification system that was already created for you using WSRR Studio graphical UML modeling.

__1. Review the Application Classification System

__a. Within the WSRR Configuration Project explorer, Expand Diagrams and Class Diagrams underneath ApplicationCS as shown below, and double click on ApplicationCS Classification System Diagram.

Page 80: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 80 Discovering the Value of WebSphere Service Registry and Repository

__b. The UML Class Editor Diagram brings up the Application Classification System hierarchy as shown below.

This is an extremely simplistic classification that subdivides Application into either Mainframe or Web applications. Mainframe is further subdivided into IMS or CICS while Web is subdivided into JSF and Portal. Multiple classification hierarchies are common since it is common to classify services and related service metadata into both business and technical categories.

__c. Close the Classification System class diagram by clicking on the X on the ClassDiagram tab.

2.5 Use the WSRR Studio Graphical UML Modeling to View a Lifecycle

In this step you will review the application lifecycle that has already been created for you using WSRR Studio Graphical UML Modeling.

Page 81: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 81

__1. Review the Application Lifecycle

__a. Within the WSRR Configuration Project explorer, expand Diagrams->LifecycleDefinition->StateMachineDiagrams as shown below, and double click on ApplicationLifecycle.

__b. The UML State Machine diagram editor brings up the ApplicationLifecycle Life Cycle diagram as shown below. Note, you may need to drag lifecycle states around in the diagram to make the complete diagram visible.

This diagram represents the lifecycle of a typical application “waterfall” development methodology with an analysis phase, a design phase, a development phase, an acceptance testing phase, a pilot phase, and full production rollout. A rectangular box represents each application lifecycle with transitions in between the states. The lifecycle has a beginning state of Project Identified and an ending state of Retired.

Page 82: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 82 Discovering the Value of WebSphere Service Registry and Repository

__c. Close the Statemachine diagram by clicking on the X on the Statemachine diagram tab.

2.6 Use the WSRR Studio Graphical UML Modeling to View a Business Model

In this step you will review the application and business unit models that has already been created for you using WSRR Studio Graphical UML Modeling.

__1. Review the Application Business Model

__a. Within the WSRR Configuration Project explorer, expand Diagrams-<<Business Model Package>> ApplicationBusinessModel->Class Diagrams and double click on ApplicationBusinessModel Business Model Diagram.

Page 83: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 83

__b. The UML Class diagram editor brings up the ApplicationBusinessModel Business Model diagram as shown below.

This Business Model is used to represent applications within an enterprise and the owning business unit for a given application. This example chose to create new entities within WebSphere Service Registry and Repository. We could have chosen to extend the Application Business Capability, but for simplicity, chose to model a new entity called Application.

Note, that whenever the Application entity is created in WSRR, it will automatically be placed in the initial state of the ApplicationLifecycle. To depict this, the Application class on the diagram is annotated with a symbol in the bottom center of the class to note that a lifecycle has been assigned to this call.

Page 84: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 84 Discovering the Value of WebSphere Service Registry and Repository

__c. Close the Business Model class diagram by clicking on the X on the class diagram tab.

2.7 Create Governance Policies on a Lifecycle Transition

In this step you will use the new policy editor in WSRR Studio, to ensure an Application has a relationship to a BusinessUnit, and the Application is classified before the Application can be moved to the Approved lifecycle state when the ApproveProject transition is attempted.

__1. Create a New Application Lifecycle Policy File

More complex governance policies that include several assertions can be created using the Governance Policy Editor. In this section you will add a policy with multiple assertions to ensure an Application classification is assigned to the Application and that a BusinessUnit relationship exists. Simple assertions that guard whether an object can be transitioned can be created directly from lifecycle diagrams.

__a. Select the My Governance Enablement Profile project and from the Tools menu, select Governance Policy Editor.

Page 85: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 85

__b. Click the New button on the Choose Governance Policy File to Open panel.

__c. Enter the ApplicationLifecyclePolicies on the New Policy Panel panel and click the OK button.

Page 86: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 86 Discovering the Value of WebSphere Service Registry and Repository

__d. The Governance Policy Editor opens with no defined policies. You will do that next.

The Governance Policy Editor has four different sections:

• Policies – Shows all the policies and global assertions in this policy file, and lets you add and delete new policies and new global assertions. Global assertions can be used in more than one policy.

• Policy Properties – Specifies the name of the currently selected policy. • Applies to – Lets you decide under which conditions the policy will be applied. For

example, the policies you will define later will apply to an Application when the ApproveProject transition is attempted.

• Pass If – Defines the assertions that must pass if the operation specified in the Applies to section is to succeed.

__2. Create a New Policy

Now you are going to create a more complex set of assertions to check that an Application has been assigned an Application taxonomy and that a BusinessUnit relationship exists. You are going to create a policy within this policy file. A policy file can contain multiple policies.

__a. Click the Add Policy icon in the Policies section.

Page 87: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 87

__b. In the name field, rename the policy to ApplicationLifecyclePolicies-ApproveApplicationProject

__3. Define Under which Conditions this Policy will Apply

__a. Click the Add button next to Transitions in the Applies to section.

__b. Expand ApplicationLifecycle and select the ApproveProject transition. Click the OK button.

Page 88: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 88 Discovering the Value of WebSphere Service Registry and Repository

__c. The ApproveProject transition will now be checked. Click the Edit button next to Targets.

Page 89: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 89

__d. Select Business Model Class and check Application under ApplicationBusinessModel. Click the Finish button.

__e. You have now defined the transition and Business Object that the policy will apply to.

Page 90: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 90 Discovering the Value of WebSphere Service Registry and Repository

__4. Create a Reusable Global Assertion

Now you are going to create a global assertion that could be reused for other lifecycle transitions in the Application Life Cycle. This assertion will ensure the Application classification is assigned.

__a. Click the Add Global Assertion icon in the Policies section.

__b. Select Classification Assertion in the assertions menu.

Page 91: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 91

__c. In the properties view change the name to ApplicationLifecyclePolicies.MustHaveApplicationTaxonomy. Select Any for Type so the assertion will pass if Application has any of the classifications.

__d. Click the Select button next to Value to choose the classifications.

Page 92: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 92 Discovering the Value of WebSphere Service Registry and Repository

__e. Select the Mainframe, CICS, IMS, Web, JSF, and Portal classifications as shown below. Click the OK button.

__f. The classifications are assigned to the assertion.

Page 93: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 93

__g. Enter the text “The object must be classified as Mainframe, CICS, IMS, Web, JSF, or Portal before allowing a transition” into Failure Message and click the Save button.

__5. Specify the Assertions that will Checked to Determine Policy Success or Failure

Now you are going to specify the assertions to be checked by the policy you created earlier in order to determine success or failure.

__a. Return back to the ApplicationLifecyclePolicies.ApproveApplicationProject policy by selecting the policy in the Policies section.

Page 94: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 94 Discovering the Value of WebSphere Service Registry and Repository

__b. Scroll down to the Pass If section for the policy, right click on the root element of the tree and Right click on The policy will pass if the following conditions are satisfied and select the AllOfAssertion assertion. This assertion is the parent assertion in which all child assertions must pass for the policy to pass.

__c. In the General section for the Properties tab, change the name of the assertion to ApplicationLifecyclePolicies-ApproveApplicationProject.ApproveApplicationAllOfAssertion and enter the text “All policies must pass” into Failure Message.

Page 95: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 95

__d. Right click on the All of the following are true element of the tree and select Reference another Assertion.

__e. On the Choose a Reference Assertion panel, and select the ApplicationLifecyclePolicies.MustHaveApplicationTaxonomy assertion and click the OK button.

__f. Now you will add a new assertion to ensure a relationship exists. Right click on the All of the following are true element of the tree and select Type Assertion.

Page 96: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 96 Discovering the Value of WebSphere Service Registry and Repository

__g. In the Properties view, click the Select button.

__h. In Target Type panel, select Business Model Class and select Application. Click the Finish button.

This assertion is simply validating that we are working with an Application object.

Page 97: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 97

__i. Right click on the Type is Application element of the tree and select Relationship Assertion.

Page 98: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 98 Discovering the Value of WebSphere Service Registry and Repository

__j. In the Properties view, change the name to ApplicationLifecyclePolicies-ApproveApplicatonProject.BusinesUnitRelationshipAssertion, select AppBusModel_owningBusinessUnit for the Relationship Name, select is within Range, and specify 1 for both Min and Max value.

Page 99: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 99

__k. In the Properties view, enter the text “A business unit must be identified as the owner of this application prior to allowing the project to be approved” into the failure message.

__l. Click the Save button.

__m. The Policy is successfully saved. You have just created a policy that ensures an Application classification is assigned for the Application Business Model and a 1 to 1 relationship is created to a BusinessUnit Business Model prior to allowing an ApproveProject transition.

Page 100: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 100 Discovering the Value of WebSphere Service Registry and Repository

2.8 Generate the WSRR Configuration Profile Artifacts

In this step you will generate the WSRR configuration profile artifacts from the UML diagrams you created for the classification system, lifecycle, business model, and governance policies. The traditional Web user interface artifacts including perspectives, collection view forms, and detail forms will also be generated for the new business model. The WSRR Business Space will reflect the other changes so new Business Models and Lifecycles will be reflected in the Business Space widgets.

__1. Generate WSRR Configuration Profile Artifacts

__a. Right click on My Governance Enablement Profile in the project tree and select WSRR->Generate All WSRR Artifacts.

Page 101: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 101

__b. The WSRR Configuration Artifacts Generation progress meter appears as shown.

__c. Click the OK button on the Configuration files generated successfully dialog.

__d. Expand Configuration Profiles and then expand Business Model Systems, Classification Systems, and Governance Policies in the project tree. You will see the generated business model, ApplicationBusinessModel, and classification system, ApplicationCS, and ApplicationLifecyclePolicies in the project tree. Note, WSRR only has one physical Lifecycle artifact to represent the different lifecycles so the Application lifecycle has been added to the Lifecycle SACL file.

Page 102: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 102 Discovering the Value of WebSphere Service Registry and Repository

2.9 Synchronize the Profile with WSRR

WSRR Studio provides a new synchronization feature that compares any changes made in WSRR Studio with the profile that is active in WSRR and lets you update those changes in WSRR, which is a much faster way to update the active profile as it means that a full export and activate are not required. This section assumes you already have a WSRR Location setup in Studio as is already pre-configured for the WSRR Studio workspace in the vmware image.

__1. Run WSRR Synchronization Check

__a. Right click on My Governance Enablement Profile in the project tree and select Synchronize Profile with WSRR.

Page 103: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 103

__b. Click the Yes button on the Confirm Open Perspective popup.

__c. On the Synchronize panel, ensure My Governance Enablement Profile is selected as the Configuration Project and WSRR Local is selected as the Target WSRR Server. Click the Finish button.

Page 104: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 104 Discovering the Value of WebSphere Service Registry and Repository

__d. A progress meter will appear while the synchronization check is running.

__2. Commit the Generated/Modified Configuration Items to the WSRR Active Profile

In the section, you will commit the generated and/or modified WSRR configuration items to the WSRR active profile. Note, you will not commit the Web user interface generated and/or modified configuration items since you will be showing the new business model, lifecycle, classification system, and governance policies in the Business Space.

__a. Expand My Governance Enablement Profile and the configuration items below. Ensure the following two items are all selected, right click and select Commit to Server. Since we have previously modeled the application business model, lifecycle, and classifications, those changes have already been applied to the running WSRR instance and do not show up in the Synchronization differences window. Note, the items in the screenshot below at the time this lab was written might not exactly match what you see.

Page 105: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 105

• MyGovernanceEnablementProfile.jar – Modified to store resource bundles – i.e. label text, message translations, etc.

• ApplicationLifecyclePolicies.xml – Generated to represent the new Application lifecycle governance policies. The small + symbol in front of the policy file name denotes this is a new artifact that was not found in the running WSRR instance.

__b. Click the Finish button on the Commit to Server panel.

Page 106: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 106 Discovering the Value of WebSphere Service Registry and Repository

__c. When publishing is complete, the Commit to Server panel will close.

2.10 Interact with the New Application Business Model in the Business Space

In this step you will interact with the new Application business model, Application classification system, Application lifecycle, and Application lifecycle policies in the WSRR Business Space user interface.

__1. Create a Service Registry for Development Space if it does not exist

In this section, you will create a space in Business Space based off an existing template called Service Registry for Development.

__a. Launch the Firefox browser and click on the Business Space bookmark.

Page 107: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 107

__b. Authenticate to WSRR as needed. Enter a username of wasadmin and password of passw0rd. Click the Login button.

__c. Click the Manage Spaces link.

__d. On the Space Manager popup, determine if a space named Service Registry – Development already exists as shown below. If the space already exists, click on the Service Registry – Development link as shown below and skip to step 2.

__e. Click the Create Space button

Page 108: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 108 Discovering the Value of WebSphere Service Registry and Repository

__f. On the Create Space popup, enter Service Registry - Development for the space name, click the Create a new space using a template radio button, and select the Service Registry for Development from the template drop down list. Select the Solution picture as the Space style and select the Space icon as shown. Click the Save button.

Each space can have its own look and feel using space styles.

Page 109: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 109

__g. The Service Registry - Development space shows up in the space manager. Click on the Service Registry – Development link as shown below.

__2. Add Actions to the Service Registry Actions Widget to Create an Application and Business Unit

__a. If not already on the Service Registry - Development space, click the Go to Spaces link and click the Service Registry - Development link on the Go to Space panel.

Page 110: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 110 Discovering the Value of WebSphere Service Registry and Repository

__b. On the Service Registry - Development space, ensure the Overview page is selected and click the Edit Page link near the top right.

__c. On the Service Registry Actions widget, click the down arrow as shown below and select Edit Settings from the popup menu.

__d. On the Service Registry Actions – Edit Settings popup, click the Create a New Action link.

Page 111: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 111

__e. On the Create a New Action panel, enter Create an Application for the Action Label and Description. Select Create a Business Object and Application from the dropdowns. Click the OK button.

__f. Repeat steps d-e entering Create a Business Unit for the Action Label and Description. Select Create a Business Object and Business Unit from the dropdowns.

__g. On the Service Registry Actions – Edit Settings popup, click the Save and Close button.

Page 112: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 112 Discovering the Value of WebSphere Service Registry and Repository

__h. Click the Finish Editing link near the top right.

__3. Create an Application and Attempt to Approve the Project for the Application

__a. On the Service Registry Actions widget, click the Create an Application link.

__b. Enter values for Name and Description as shown below. Select External for Application Visibility. Enter a 0 for Application Budget. Click the Date selector icon to the right of Availability Date to specify a date as shown below. Click OK on the Date popup when you have your target date. Click the Finish button. Note, fields with an * to the left of the label denote the fields are required.

Page 113: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 113

__c. The Customer Self-Service Portal Application is created and the Service Registry Detail widget appears with the application details. Select ProposeProject in the Action drop down list.

__d. Click the OK button on the Operation successful popup.

Page 114: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 114 Discovering the Value of WebSphere Service Registry and Repository

__e. The Customer Self-Service Portal application is now in the Proposed state.

__f. Select ApproveProject in the Action drop down list.

Page 115: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 115

__g. The Approve Project transition fails with the failure messages that you specified in previous steps. Note, the failure messages are much easier to understand in this release. Click the OK button to dismiss the error popup window.

__4. Modify the Customer Self-Service Portal Application Metadata to Allow the Approval to Succeed

In this section, you will modify the Customer Self-Service Portal application to assign an application classification (taxonomy) and an owning business unit.

__a. On the Service Registry Details widget, click the Edit icon.

Page 116: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 116 Discovering the Value of WebSphere Service Registry and Repository

__b. Click the Browse Classifications link.

__c. On the Browse Classifications popup window, expand Application->Web and select Portal. Click the Close button.

Page 117: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 117

__d. On the Service Registry Details widget, under Owning Business Unit, click the Add

BusinessUnit link.

Page 118: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 118 Discovering the Value of WebSphere Service Registry and Repository

__e. Enter Customer Service for the name of the business unit and click the Create button.

__f. Enter a description as shown below and a department of CS1000. Click the Finish button.

Page 119: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 119

__g. Click the Finish button on the Service Registry Details widget for the Customer Self-Service Portal application to save the changes to this application.

__h. Select ApproveProject in the Action drop down list.

Page 120: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 120 Discovering the Value of WebSphere Service Registry and Repository

__i. This time the ApproveProject transition succeeds. Click the OK button to close the Operation successful popup window.

__j. The Customer Self-Service Portal application is now in the Approved state.

__k. Click the Log out link on the upper right hand corner of the Business Space to log out.

You have completed this section using the WSRR Studio Governance Policy Editor.

Page 121: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 121

2.11 Lab Review

During this lab, you:

• Reviewed a custom classification system, service business model, and service lifecycle system in WebSphere Service Registry and Repository Studio

• Created custom service lifecycle governance policies using the WebSphere Service Registry and Repository Studio

• Synchronized changes in the Studio workspace with the active configuration for the running WebSphere Service Registry and Repository server

• Used the Web 2.0 user interface to interact with the new service lifecycle governance policies and the previously published custom classification system, service business model, and service lifecycle system.

CONGRATULATIONS!

You have successfully completed Lab 2 – Customizing WebSphere Service Registry and Repository using Studio

Page 122: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 122 Discovering the Value of WebSphere Service Registry and Repository

Lab 3 Reporting on Services and Related Metadata using WebSphere Service Registry and Repository Studio

3.1 Introduction to Reporting for WebSphere Service Registry and Repository

In this section, you will learn how to design reports using WSRR Studio. WSRR Studio provides a report designer perspective used in this section to design reports. The report designer leverages the Business Intelligence and Reporting Tools (BIRT) open source framework. WSRR also provides a runtime component for rendering the reports.

3.2 Lab Scenario

At this point, we assume that The Supply Company is well engaged in its SOA journey. They have been using WSRR for a while now and the WSRR administrator has been asked to provide reports to the head of I/T who wants to have more visibility on the services developed so far. He wants to know how many services have been developed and also how many are in production. He wants to understand the cost of developing the services so he can better understand the investment in SOA done in the company. We assume that the head of I/T does not have access to WSRR and will be given a report in a pdf format.

Section Steps:

The objectives of this section are to:

• Learn how to setup data sources for WebSphere Service Registry and Repository reports.

• Learn how to design simple reports for WebSphere Service Registry and Repository

• Learn how to export reports in various formats

• Learn how to use visualize reports using the WebSphere Service Registry and Repository Web 2.0 user interface

The steps you will perform in this section are:

• Design a simple report in WSRR Studio that reports on a single entity – Business Service

• Deploy the report to the WSRR Server.

• Run the report from the WSRR Business Space.

• Export the report in various formats.

Page 123: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 123

3.3 Open an Existing Configuration Profile Project

In this step you will open an existing WSRR configuration project in WSRR Studio.

__1. Reopen WSRR Studio if still open from completing lab 2.

__a. Close WSRR Studio by choosing File->Exit from the menu.

__b. To start WSRR Studio, double click on the WSRR Studio icon on the desktop.

__c. If prompted with a workspace prompt, type or select C:\IBM\WSRRStudio\workspace and click the OK button.

Page 124: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 124 Discovering the Value of WebSphere Service Registry and Repository

__2. Open the WSRR Configuration perspective

We initially create the report from the WSRR Configuration perspective, in the WSRR Configuration Project Explorer panel.

__a. Select the Open Perspective icon near the upper right of WSRR Studio.

__b. Select Other from the popup menu.

__c. Select WSRR Configuration and click the OK button.

3.4 Create a Simple Report

The creation or design of the report is done in WSRR Studio. There are three steps to create a report:

• Creation of the data source

• Creation of the data set

Page 125: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 125

• Testing in WSRR

__1. Create a Report

__a. In the WSRR Configuration perspective, select “My Governance Enablement Profile”, and right click, then select New -> WSRR Report

__b. Enter simple.rptdesign and click the Finish button.

Page 126: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 126 Discovering the Value of WebSphere Service Registry and Repository

__c. Review the blank report in the Report Design perspective.

You can see the various panels, on the top left. We can see the Palette, Data Explorer and Resource Explorer tabs that we are going to use to create the report.

Page 127: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 127

__2. Create the Data Source

The data source defines a connection to a specific WebSphere Service Registry and Repository server that will be queried to produce the report data.

__a. Click on the Data Explorer tab

Page 128: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 128 Discovering the Value of WebSphere Service Registry and Repository

__b. Right click on Data Sources and select New Data Source

__c. Select XML Data Source and enter XML_BS_GQ (for XML Data Source Business Service Graph Query). Click the Next button.

We have the choice between WebSphere Registry and Repository (WSRR) Data Source and XML Data Source. In this sample, we choose XML Data Source. The XML Data Source uses REST queries to retrieve content and service metadata from WSRR. WSRR provides a REST interface as well as Web Service and EJB interfaces to retrieve and publish content and service metadata.

Page 129: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 129

__d. Specify the graph query by entering in the URL of the XML Source field as shown below. Replace hostname with base-win2k8x64, which is the host name of this VMWare image. You leave the URL of the schema field empty. Keep the encoding to Auto. Click the Finish button.

https://hostname:9443/WSRR/8.0/Metadata/XML/GraphQuery?query=/WSRR/GenericObject[classifiedByAnyOf(.,'http://www.ibm.com/xmlns/prod/serviceregistry/profile/v6r3/GovernanceEnablementModel%23BusinessService')]

To save typing, use Notepad to open the Lab_Part_3_Datasources.txt file in C:\Labfiles and copy/paste the query string into URL of the XML source.

Hint: Notice the Browse button, next to the URL field. This gives you the opportunity to specify a static XML file, which is useful if you want to use test data.

Note: It is important to put an actual hostname as specified in the URL field that matches the SSL Certificate of the server. Usually with WebSphere, this is the hostname of the machine.

Hint: You can test that the connection is correct by clicking on the Test Connection button. If prompted to login, enter wasadmin/passw0rd for the userid and password.

Page 130: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 130 Discovering the Value of WebSphere Service Registry and Repository

__3. Create the Data Set

The data set represents a mapping of the result XML to rows and columns that are available to the report.

__a. In the Data Explorer tab, right click on Data Set and select New Data Set

__b. Be sure that XML_BS_GQ is selected for XML Data source, XML Data Set is selected for Data Set Type, and enter BusinessServicesSet for the name and click the Next button.

Page 131: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 131

__c. Select Use the XML file defined in the data source and click the Next button

__d. Expand resources and select resource. Click the > symbol to select the XML element.

__e. Select XML elements named “resource” at fixed absolute path, and click the OK button.

If you used the REST query in the Web browser earlier, you should recognize the resources/resource elements

Page 132: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 132 Discovering the Value of WebSphere Service Registry and Repository

__f. Click the Next button.

__g. In the Column Mapping summary panel, we have the opportunity to select the elements we want to retrieve. Expand resource and select @bsrURI. Click the > symbol.

Page 133: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 133

__h. Click the OK button to select the defaults on the Column Mapping panel for bsrURI.

Page 134: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 134 Discovering the Value of WebSphere Service Registry and Repository

__i. Add an additional property. Click the Add button.

We will now add two properties, the name and the description of the service.

__j. Enter or select the following values and then click the OK button.

Column name: name

Data Type: String

XPath Expression: /properties/property/[@name=’name’]/@value

Page 135: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 135

Again if you look at the REST query in the Web browser, you will find elements such as:

<resources>

<resource bsrURI="3e5f493e-a268-48ee.91e5.7d72097de5c7" type="GenericObject" governanceRootBsrURI="3e5f493e-a268-48ee.91e5.7d72097de5c7">

<properties>

<property name="bsrURI" value="3e5f493e-a268-48ee.91e5.7d72097de5c7"/>

<property name="name" value="Account eligibility"/>.

So what we enter in the Column mapping window, is just an XPath query to find one property in this XML structure.

__k. Repeat steps i-j above for the description property

Column name: description

Data Type: String

XPath Expression: /properties/property/[@name=’description’]/@value

Page 136: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 136 Discovering the Value of WebSphere Service Registry and Repository

__l. You can now check that you retrieve the results as expected, by clicking on Show Sample Data button.

__m. You should see results similar to the one below. Click the Close button.

Page 137: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 137

__n. Click the Finish button on the Column Mapping panel now that you have completed the column mapping.

Page 138: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 138 Discovering the Value of WebSphere Service Registry and Repository

__o. You can now specify additional details around the output columns. In our case, we do not change anything, since the column names will be used as-is in the report. Click the OK button

__4. Create the Report

We are now ready to create the report to render the results.

__a. We will use a very quick way to create a tabular report. Drag and drop the BusinessServiceSet data set to the Layout pane as shown. Studio automatically created the table with the correct column names and values.

__b. Save the result by clicking on the save icon or by typing Ctrl + S

__c. Test the report by clicking the Preview tab.

Page 139: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 139

In this section, we do not go into detail about advanced formatting, so the report is very basic.

3.5 Publish the Report to WSRR

We are now ready to publish the report to the WSRR server.

__1. Switch back to the WSRR Configuration perspective

We publish the report from the WSRR Configuration perspective, in the WSRR Configuration Project Explorer panel.

__a. Select the Open Perspective icon near the upper right of WSRR Studio.

__b. Select Other from the popup menu.

__c. Select WSRR Configuration and click the OK button.

Page 140: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 140 Discovering the Value of WebSphere Service Registry and Repository

__2. Publish the Report

We will publish the report from the WSRR Configuration perspective, in the WSRR Configuration Project Explorer panel.

__a. Right click on My Governance Enablement Profile and select Refresh

Page 141: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 141

__b. Expand My Governance Enablement Profile > Configuration Profiles Files > Birt Report Design and then right click on simple and then select Publish…

__c. Select WSRR Local and click the Finish button.

Page 142: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 142 Discovering the Value of WebSphere Service Registry and Repository

3.6 View the Report from the Business Space

We are now ready to view the report in Business Space. WSRR improves the user experience for accessing reports. They are now directly available in a pre-configured page. (Charts and Reports).

__1. Create a Service Registry for Development Space if it does not exist

In this section, you will create a space in Business Space based off an existing template called Service Registry for Development if it does not already exist from completing Part 1 or Part 2 in this lab.

__a. Launch the Firefox browser and click on the Business Space bookmark.

__b. Authenticate to WSRR as needed. Enter a username of wasadmin and password of passw0rd. Click the Login button.

__c. Click the Manage Spaces link.

Page 143: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 143

__d. On the Space Manager popup, determine if a space named Service Registry – Development already exists as shown below. If the space already exists, click on the Service Registry – Development link as shown below and skip to step 2.

__e. Click the Create Space button.

Page 144: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 144 Discovering the Value of WebSphere Service Registry and Repository

__f. On the Create Space popup, enter Service Registry - Development for the space name, click the Create a new space using a template radio button, and select the Service Registry for Development from the template drop down list. Select the Solution picture as the Space style and select the Space icon as shown. Click the Save button.

Each space can have its own look and feel using space styles.

__g. The Service Registry - Development space shows up in the space manager. Click on the Service Registry – Development link as shown below.

Page 145: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 145

__2. View the Report

__a. Select the Charts and Reports page in the Service Registry – Development space. The new report is now available with a name of simple.rptdesign. Click the simple.rptdesign link.

Page 146: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 146 Discovering the Value of WebSphere Service Registry and Repository

__b. The BIRT report viewer opens and the report will appear.

Page 147: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 147

3.7 Export the Report in Various Formats

In the BIRT Report viewer, you have the possibility to export the report in many different formats: PDF, PowerPoint, json, Word, Open Document Presentation, PostScript, Open Document Spreadsheet, Open Document Text, and Excel.

__1. Export the report

__a. Click on Export State icon

__b. Select the format of export, for example Excel, and click the OK button.

__c. You can now save or open the Excel spreadsheet

.

Page 148: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 148 Discovering the Value of WebSphere Service Registry and Repository

3.8 References to get more information on reports.

• There is a Redpaper called IBM WebSphere Service Registry and Repository Reporting with Business Intelligence and Reporting Tools that contains many samples.

http://www.redbooks.ibm.com/abstracts/redp4687.html?Open

• The redbook SG24-7793-00 Service Lifecycle Governance with IBM WebSphere Service Registry and Repository V6.3 contains a chapter on reporting.

http://www.redbooks.ibm.com/abstracts/sg247793.html?Open

• The WebSphere Service Registry and Repository Infocenter

http://publib.boulder.ibm.com/infocenter/sr/v7r5/index.jsp

3.9 Lab Review

During this lab, you:

• Defined a data source for a report

• Designed a simple report

• Deployed the report to the WebSphere Service Registry and Repository server

• Viewed the report from the Web 2.0 user interface

• Learned how to export reports in a variety of formats

CONGRATULATIONS!

You have successfully completed Lab 3 – Reporting on Services and Related Metadata using WebSphere Service Registry and Repository Studio

Page 149: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 149

Lab 4 Defining a WebSphere MQ Application to WebSphere Service Registry and Repository

4.1 Lab Scenario

WebSphere MQ applications can be considered as services within a service-oriented architecture (SOA): they are loosely coupled and interoperate irrespective of the platforms on which they run.

Registering WebSphere MQ applications as services in WebSphere Service Registry and Repository brings benefits in the following areas.

● WebSphere MQ applications are catalogued as reusable assets.

● They become subject to SOA Governance

● You can perform impact analysis.

● Management and auditing.

WebSphere MQ applications can be described as services based on the WebSphere MQ Service Definition specification and the WebSphere MQ Internationalized Resource Identifier (IRI) specification. These can be downloaded from:

http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg24017518

The WebSphere MQ Service Definition specification defines the standard for describing WebSphere MQ applications as services using WSDL and the WebSphere MQ IRI specification defines the standard for addressing WebSphere MQ message destinations as URIs in a service definition.

WebSphere MQ V7 provides a Service Definition Wizard in WebSphere MQ Explorer, which enables creation of WSDL for a WebSphere MQ application. This wizard allows easy creation of WebSphere MQ WSDL using WebSphere MQ Service Binding and generates the WSDL document based on WebSphere MQ Service Definition and WebSphere MQ IRI specifications.

In this lab you will:

● Use the WebSphere MQ Service Definition Wizard to define a WebSphere MQ application as a service and generate a WSDL document

● Load the document into WebSphere Service Registry and Repository

● Examine the WebSphere MQ entities created by WebSphere Service Registry and Repository

● Perform impact analysis on a WebSphere MQ Queue manager and explore the relationships between a WebSphere MQ service and the entities it depends on.

Page 150: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 150 Discovering the Value of WebSphere Service Registry and Repository

4.2 Generate a WSDL using the WebSphere MQ Service Definition Wizard

__1. Start WebSphere MQ Explorer

__a. Click the shortcut WebSphere MQ Explorer on the desktop.

The WebSphere MQ Explorer opens.

__2. Create a new WebSphere MQ Service Definition

__a. In the WebSphere MQ Explorer – Navigator panel, right-click on the Service Definition Repositories folder and select Add Repository… from the context menu.

__b. Enter WMQServices in the Add New Service Definition Repository dialog box and click on the Finish button.

Page 151: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 151

__c. Right-click WMQServices and select New -> Service Definition

The New Service Definition window opens.

__d. Enter a name of AccountCreationV1_0MQPort for the new service and select the Request-Response message exchange pattern as shown below.

A Message Exchange Pattern describes the message pattern required by the WebSphere MQ application for which the WSDL document is being generated. WebSphere MQ Service Definition provides support for Request-Response and One-Way message exchange patterns.

__e. Click Next

Page 152: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 152 Discovering the Value of WebSphere Service Registry and Repository

__f. Click Next again to select a Binding Type of WebSphere MQ for the service.

WebSphere MQ Service Binding provides support for native WebSphere MQ and WebSphere MQ SOAP binding. The Binding Type should be selected, depending on whether the application expects a WebSphere MQ message or a SOAP message.

__g. Select Operation and enter createAccount for the operation name

__h. Select Input destination and provide:

input destination name: msg/queue/REQUEST.CREATEACCOUNT.QUEUE

destination queue manager name: CORP.ACCOUNT.QM

Leave Client connection properties set to No client connection properties.

Page 153: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 153

__i. Select Input message schema and enter:

Inbound datatype: CustomerBO

Import schema file: AccountCreationSchema.xsd

Import namespace: http://www.jkhle.com/Account

To define the schema for the request message payload.

__j. Select Output destination and provide:

output destination name: msg/queue/RESPONSE.CREATEACCOUNT.QUEUE

destination queue manager name : CORP.ACCOUNT.QM

Leave connection properties unchanged.

Page 154: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 154 Discovering the Value of WebSphere Service Registry and Repository

__k. Select Output message schema and enter:

Outbound datatype: TrueOrFalseBO

Import schema file: AccountCreationSchema.xsd

Import namespace: http://www.jkhle.com/Account

To define the schema for the response message payload.

__l. Click Finish to create the service definition.

This process generates the AccountCreationV1_0_MQPort service definition.

__3. Export the WebSphere MQ Service definition from WebSphere MQ Explorer.

__a. Right-click AccountCreationV1_0_MQPort

and select Export

Page 155: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 155

__b. Browse for C:\Labfiles\GEP_Tutorials.

__c. Click OK.

__d. Click OK again.

__e. This generates the AccountCreationV1_0_MQPort.wsdl document in C:\Labfiles\GEP_Tutorials\WMQServices.

__f. Close WebSphere MQ Explorer.

Page 156: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 156 Discovering the Value of WebSphere Service Registry and Repository

4.3 Start WSRR and Create a Business Space

If you have already created business spaces for the different user roles from lab one then you can skip this section and proceed to section 4.4.

__1. Start WebSphere Service Registry and Repository

__a. Click the shortcut Start the Server to start WebSphere Service Registry and Repository that is hosted in WebSphere Application Server.

__b. This will bring up a window. The window will display startup information. Wait until the window indicates the server has started.

__c. The window will close automatically after startup has completed.

Create a Business Space for Development

A Business Space contains a set of pages with widgets on each page to retrieve and update content. WebSphere Service Registry and Repository ships with five preconfigured templates: Service Registry for Business, Service Registry for Development, Service Registry for Operations, Service Registry for SOA Governance, and Service Registry Policy Analytics. Each of these templates contains a pre-configured set of pages and widgets to interact with WebSphere Service Registry and Repository.

In this exercise, we simply want to look at the MQ artifacts in WSRR. A Business Space that is based on either the Development or the Operations templates meet our goal. For this exercise, we will create a Business Space that is based on the Development template.

Page 157: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 157

__2. Create a Service Registry for Development Space.

In this section, you will create a business space based off of the Service Registry for Development template.

__a. Launch the Firefox browser and click on the Business Space bookmark.

__b. Authenticate to WSRR as needed. Enter a username of wasadmin and password of passw0rd. Click the Login button.

__c. Click the Manage Spaces link.

__d. Click the Create Space button.

Page 158: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 158 Discovering the Value of WebSphere Service Registry and Repository

__e. On the Create Space popup, enter Service Registry – Development for the space name, click the Create a new space using a template radio button, and select the Service Registry for Development option from the template drop down list. Select the Solution Design space style and space icon as shown below. Click the Save button.

__f. When complete, you should have the Service Registry – Business listed. Note: The space icon to the left of the space name may differ depending on your personal preference for what you selected for space style and icon. Click the Done button.

Page 159: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 159

4.4 Load the MQ artifacts into WSRR

In this section, you will load and browse the contents of the WSDL file that was generated by Websphere MQ Explorer. Both of these activities can be preformed from the Development business space that was just created.

__1. Load the WSDL file

__a. Click the Go to Spaces link.

__b. Click the Service Registry – Development link.

Page 160: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 160 Discovering the Value of WebSphere Service Registry and Repository

__c. Ensure you are on the Overview page. The first page of a space is the default when navigating to a new space.

Page 161: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 161

__d. Each space consists of a set of pages and widgets within each page. The widgets are containers within each page that interact with WebSphere Service Registry and Repository to retrieve and update service data. Widgets may be wired to each other to use output from one widget as input for another widget. In the Service Registry – Business space, there are five pages named Overview, Browse, Graph, Consumers and Providers, and Charts and Reports. On the left of the Overview page are a Collection View Widget named Subscribable Capability Versions, a widget named Watch List – Service Registry Collection, and another widget named Versions by Governance State. On the right from top to bottom are a Search widget, Service Registry Actions widget, a Services by Owning Organization widget, and a Reference widget that contains several links to WSRR documentation.

__e. Select the Load Documents link from the Service Registry Actions widget which can be found in the top right-hand of the screen.

__f. Click the Browse button on the Load Documents panel.

Page 162: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 162 Discovering the Value of WebSphere Service Registry and Repository

__g. On the File Upload dialog, navigate to C:\Labfiles\GEP_Tutorials\WMQServices and select the AccountCreationV1_0MQPort.wsdl file. Click the Open button.

Page 163: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 163

__h. On the Load Documents panel, enter a description as shown and enter 1.0 for Document version. Click the Next button.

__i. Since this is a multi-part WSDL, the next panel is prompting for any WSDL or XSD files that are imported. Click the Add link next to AccountCreationSchema.xsd. (Note, AccountCreationSchema.xsd might have been already loaded from previous labs in which case you can just select instead of add.)

Page 164: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 164 Discovering the Value of WebSphere Service Registry and Repository

__j. Click the Browse button on the Load Documents panel.

Page 165: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 165

__k. On the File Upload dialog, navigate to C:\Labfiles\GEP_Tutorials and select the AccountCreationSchema.xsd file. Click the Open button.

Page 166: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 166 Discovering the Value of WebSphere Service Registry and Repository

__l. Enter 1.0 in the Document version field. Click the OK button.

__m. Now that all the dependant artifacts have been accounted for, the Finish button is now enabled. Click the Finish button.

Page 167: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 167

__n. Click the Close button on the Summary panel.

Page 168: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 168 Discovering the Value of WebSphere Service Registry and Repository

4.5 Browse the MQ Artifacts in WSRR

__1. Locate the uploaded WSDL file

__a. Select the Browse tab. It is located to the right hand side of the Overview tab. The Search widget is located right under the Browse tab.

__b. Select the WSDL Documents entry from the All Listed Types drop down. Optionally, you can type in the first letter(s) and/or the full name of the file that you’re looking for.

__c. WSRR returns a list of all the WSDL files that are already in its repository.

__d. Select AccountCreationV1_0MQPort.wsdl (1.0) from the WSDL Document – Service Registry Collection widget.

Page 169: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 169

__e. This action results in a dual graphical and detailed display of the components that make up the WSDL file. The Service Registry Navigator widget and the WSDL Document – Service Registry Detail widget are interconnected. A click on an icon in the Navigator results in a change in the Registry Detail and vice versa. WSRR shows all three components that make up the WSDL file, namely the XSD, the WSDL Port Type, and the WSDL Service files are all shown.

i. Schema file: AccountCreationSchema.xsd, ii. WSDL Port Type: AccountCreationV1_0MQPort_PortType, iii. WSDL Service: AccountCreationV1_0MQPort.

Page 170: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 170 Discovering the Value of WebSphere Service Registry and Repository

__f. In the Service Registry Navigator widget, click on the AccountCreationV1_0MQPort icon.

__g. In the Service Registry Navigator widget, click on the arrow that is pointing to the right

Page 171: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 171

__h. In the Service Registry Navigator widget, hover your mouse over either one of the two following queue icons:

iv. REQUEST.CREATEACCOUNT.QUEUE v. RESPONSE.CREATEACCOUNT.QUEUE

__i. Click on the CORP.ACCOUNT.QM from the pop up menu.

Page 172: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 172 Discovering the Value of WebSphere Service Registry and Repository

__j. Select the Graph tab. It is located next to the Browse tab in the upper left hand corner of the screen.

__k. This opens the Service Registry Graphical Explorer as shown below. In the diagram, you can see the two queues and the Queue Manager that were defined in earlier on in the lab in Websphere MQ Explorer.

__l. You can change the display layout from horizontal to vertical; as well do things such as: Zoom In, Zoom Out, pan, and Fit-To-Screen. These are available from an icon menu bar that is located in the upper right hand corner of the Graphical Explorer as shown below.

__m. The following snapshot shows the diagram in a vertical display mode.

Page 173: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 173

You have completed the lab.

4.6 Lab Review

During this lab, you:

● Used the WebSphere MQ Service Definition Wizard to define a WebSphere MQ application as a service and generate a WSDL document

● Loaded the document into WebSphere Service Registry and Repository

● Examined the WebSphere MQ entities created by WebSphere Service Registry and Repository

● Explored the relationships between a WebSphere MQ service and the entities it depends on.

Page 174: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 174 Discovering the Value of WebSphere Service Registry and Repository

CONGRATULATIONS!

You have successfully completed Lab 4 - Defining a WebSphere MQ Application to WebSphere Service Registry and Repository.

Page 175: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 175

Lab 5 Implementing Version Control with WebSphere Service Registry and Repository and WebSphere Message Broker

5.1 Introduction to integrating WebSphere Message Broker with WebSphere Service Registry and Repository

WebSphere Message Broker can be used as an enterprise service bus for connectivity of enterprise applications over a wide range of protocols and message formats. It can access WebSphere Service Registry and Repository at run time to retrieve service end points, policy documents and other data. Together, WebSphere Service Registry and Repository and WebSphere Message Broker can dynamically manage the SOA infrastructure.

WebSphere Message Broker provides two built-in primitive nodes that can be used to dynamically retrieve service endpoints or other resources from WebSphere Service Registry and Repository. These are:

● EndpointLookup node

● RegistryLookup node

The EndpointLookup node is used to retrieve a service endpoint for a WSDL service from WebSphere Service Registry and Repository. The node inserts the retrieved service endpoint in the local environment tree for use by subsequent SOAP or HTTPRequest nodes to call the Web service.

The RegistryLookup node is used to retrieve any artifacts that are stored in WebSphere Service Registry and Repository, for example, WSDL, XML schema, XSLT, policy documents, and so on. This is a general purpose node that can be used to query and retrieve any document or meta data from WebSphere Service Registry and Repository. The node inserts the retrieved artifacts in the local environment tree for use in subsequent processing of the message flow.

In this lab we will work with an EndpointLookup node.

5.2 Lab scenario

This Lab demonstrates how an EndpointLookup node can be used to dynamically route a service request to an available service endpoint that is governed in WebSphere Service Registry and Repository.

JKHL has a Customer Update service running in their production environment that requires an upgrade. To protect applications from changes to the Customer Update service, JKHL utilizes an EndpointLookup node in a message flow to look up the online endpoint of the Customer Update service in WebSphere Service Registry and Repository.

The version that is currently running in production is Version 1_0. Once Version 2_0 is deployed and available, the endpoint for Version 1_0 will be classified as offline in WebSphere Service Registry and Repository. All service consumer requests for the Customer Update service will be directed to the endpoint for Version 2_0, enabling Version 1_0 to be deprecated with no impact on service consumers and with no interruption to the service.

Page 176: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 176 Discovering the Value of WebSphere Service Registry and Repository

The following diagram shows the architecture for accessing WebSphere Service Registry and Repository from WebSphere Message Broker.

In the lab we do not use a Compute Node to perform Service Choice, but go direct to Service Invocation using the endpoint retrieved from WebSphere Service Registry and Repository. The invoked web services are provided by two message flows in WebSphere Message Broker.

In this lab you will:

● Examine a Business Service with two Service Versions and related endpoints.

● Use a WebSphere Message Broker message flow to invoke the active version of the service.

● Make a new version active

● Take the original service off-line and observe that the new service version is selected.

Page 177: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 177

5.3 Start WSRR and Create a Business Space

If you have already created business spaces for the different user roles from lab one then you can skip this section and proceed to section 5.4. During this lab you will be one of the operations team. In this section, you will create a business space for the Operations role. A space contains a set of pages with widgets on each page to retrieve and update content. WebSphere Service Registry and Repository ships with five pre-configured templates: Service Registry for Business, Service Registry for Development, Service Registry for Operations, Service Registry for SOA Governance, and Service Registry Policy Analytics. Each of these templates contains a pre-configured set of pages and widgets to interact with WebSphere Service Registry and Repository.

__1. Start WebSphere Service Registry and Repository

__a. Click the shortcut Start the Server to start WebSphere Service Registry and Repository that is hosted in WebSphere Application Server.

__b. This will bring up a window. The window will display startup information. Wait until the window indicates the server has started.

__c. The window will close automatically after startup has completed.

__2. Create a Business Space for Operations

In this section, you will create a business space based off of the Service Registry for Operations template.

__a. Launch the Firefox browser and click on the Business Space bookmark.

Page 178: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 178 Discovering the Value of WebSphere Service Registry and Repository

__b. Authenticate to WSRR as needed. Enter a username of wasadmin and password of passw0rd. Click the Login button.

__c. Click the Manage Spaces link.

__d. Click the Create Space button.

Page 179: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 179

__e. On the Create Space popup, enter Service Registry – Operations for the space name, click the Create a new space using a template radio button, and select the Service Registry for Operations option from the template drop down list. Select the Business Design space style and space icon as shown below. Click the Save button.

Each space can have its own unique look and feel using space styles.

__f. Click the Done button.

Page 180: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 180 Discovering the Value of WebSphere Service Registry and Repository

Page 181: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 181

5.4 Implement Service Versioning with WMB and WSRR

__1. Examine the service versions of the Customer Update service.

__a. Click the Go To Spaces link and click the Service Registry – Operations link on the Go To Spaces Panel.

__b. Click the Browse tab.

Page 182: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 182 Discovering the Value of WebSphere Service Registry and Repository

__c. Select Business Service from the search widget drop down list and click the Search button to perform a search for Business Services to find Customer update service.

__d. Click the Customer update service.

`

Page 183: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 183

__e. Select the Graph tab.

`

__f. This will produce a graphical representation of the Customer update service.

If necessary, you can resize the graph using the orientation tools above the graph.

Hover over the two Service Versions, and the Service Ports and SOAP Service Endpoints, and note that you have versions 1.0 and 2.0 of each. As you hover over the version 1.0, the details will appear, note that it is online and in production. Also note the Namespace and Port Name values. WebSphere Message Broker will use this information to retrieve the endpoint. As you hover over version 2.0, note that it has the same Namespace and Port Name as the version 1 endpoint and is also classified as Production, but it is Offline.

__2. Start the WebSphere Message Broker Toolkit and examine the pre-configured message flow.

__a. From the desktop, double click the icon for the WebSphere Message Broker Toolkit.

Page 184: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 184 Discovering the Value of WebSphere Service Registry and Repository

__b. Select the workspace C:\IBM\workspace and click OK.

When the toolkit opens, the WSRR_Connectivity.msgflow will be visible. (If it is not, find it in the navigator panel on the left hand side and double click to open it.

__c. Click on the Endpoint Lookup One icon to select it.

__d. Click the Properties tab, and examine the properties of

Page 185: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 185

Endpoint Lookup One.

It has been configured to query WebSphere Service Registry and Repository based on:

PortType Name = DemoCustomer

PortType Namespace = http://demo.sr.eis.ibm.com

and a Classification:

http://www.ibm.com/xmlns/prod/serviceregistry/lifecycle/v6r3/LifecycleDefinition#Online

Classification URI Note that a fully qualified OWL URI is used here. To discover the URI for Online in WebSphere Service Registry and Repository:

1. Log on with the Configuration perspective.

2. Select Active Profile -> Classification Systems

3. Click Governance Profile Lifecycle Classifications

4. Click Classes 5. Expand State 6. Expand Service Endpoint Lifecycle 7. Click Online

The URI is in the Class ID field.

The Match policy is one so WebSphere Service Registry and Repository will return only one result.

Page 186: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 186 Discovering the Value of WebSphere Service Registry and Repository

__3. Start the Broker if it is not already started. In the Brokers panel, right click on MB8Broker and select Start.

Wait until MB8Broker is completely started before proceeding to the next step. A green up arrow will appear next to the broker name and execution group when completely started.

__4. Run the message flow.

__a. In the navigation window, double click select_online.mbtest.

A new panel appears.

Page 187: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 187

Note that Enqueue is already selected.

__b. Click Send Message.

A message is sent to the WebSphere MQ Queue WSRR_IN.

__c. Click Dequeue to select it.

__d. Click Get Message to retrieve the response.

The retrieved message tells us that the version 1.0 Web service has been used.

Page 188: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 188 Discovering the Value of WebSphere Service Registry and Repository

Possible Error Condition Instead of the expected message, you may get the error message: No more message available

This means that the queue you are retrieving from is empty, but it may not be for long! Repeat steps c and d above until a message is received. It is important not to ignore this message. Because we are using WebSphere MQ as the transport, you will always get a response to your request. If you send a new message before seeing the response to your original message, your requests and responses will get out of step. This can be very confusing.

__e. Note, instead of the expected message, you may get the error message: No more messages available. This means that the queue may be empty due to timing so repeat steps c-d until a message is received.

__f. Click the X in the select_online tab to close the Flow Test.

Do not save changes.

__g. We will leave the WebSphere Message Broker Toolkit for now, but do not close it.

__5. Transition the version 2.0 Endpoint to a state of Online.

__a. If not already logged in, login to Business Space as wasadmin, and switch to the Service Registry - Operations perspective and click the Browse tab.

__b. From the Service Registry Collection widget, select All Endpoints from the View drop down list.

Page 189: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 189

__c. This will display both versions of the DemoCustomer endpoints we will be using.

A list of Offline and Online Endpoints are displayed.

__d. Click the http://localhost:7800/DemoCustomer_v20/services/DemoCustomer link

Page 190: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 190 Discovering the Value of WebSphere Service Registry and Repository

The details of this Endpoint are displayed.

__e. From the Action drop down click Approve for Use.

Page 191: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 191

__f. The Endpoint is now Online, which means the Endpoint Lookup node in WebSphere Message Broker will now return this endpoint based on the classification query.

Page 192: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 192 Discovering the Value of WebSphere Service Registry and Repository

__6. We now have two online endpoints. Let’s see which one WebSphere Message Broker retrieves.

__a. Return to the WebSphere Message Broker Toolkit.

__b. In the navigation window, double click select_online.mbtest.

A new panel appears.

Note that Enqueue is already selected.

__c. Click Send Message.

Page 193: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 193

A message is sent to the WebSphere MQ Queue WSRR_IN.

__d. Click Dequeue to select it.

__e. Click Get Message to retrieve the response.

Note which version of the Web service has been used.

__f. Close the Flow Test without saving it.

__g. Repeat from step _b. a number of times.

You may get version 1.0 or version 2.0, but you cannot assume this.

If you need more certainty during transition, you could retrieve all matching endpoints and use a compute note to choose, say, the one with highest version number.

__h. We will leave the WebSphere Message Broker Toolkit for now, but do not close it.

__7. Take the version 1.0 endpoint offline

__a. If not already logged in, login to Business Space as wasadmin, and switch to the Service Registry - Operations perspective and click the Browse tab.

__b. From the Service Registry Collection widget, select All Endpoints from the View drop down list

The list of online endpoints is displayed.

Page 194: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 194 Discovering the Value of WebSphere Service Registry and Repository

__c. Click the http://localhost:7800/DemoCustomer_v10/services/DemoCustomer link.

Details of the version 1.0 endpoint are displayed.

__d. From the Action drop down list, select Revoke from Use.

The endpoint is now Offline.

__e. Logout from Business Space

__8. We now have a single online endpoint. Let’s see which one WebSphere Message Broker retrieves.

__a. Return to the WebSphere Message Broker Toolkit.

__b. In the navigation window, double click select_online.mbtest.

A new panel appears.

Page 195: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 195

Note that Enqueue is already selected.

__c. Click Send Message.

A message is sent to the WebSphere MQ Queue WSRR_IN.

__d. Click Dequeue to select it.

__e. Click Get Message to retrieve the response.

Note which version of the Web service has been used.

__f. Close the Flow Test without saving it. Then repeat from step _b. a number of times. Version 2.0 should be selected every time.

You have successfully implemented version 2.0 without a service outage!

You have completed the lab.

5.5 Lab Review

During this lab, you:

● Examined a Business Service with two Service Versions and related endpoints.

● Used a WMB message flow to invoke the active version of the service.

● Made a new version active

● Took the original service off-line and observed that the new service version is selected.

Page 196: WSRR

IBM Software Discovering the Value of WebSphere Service Registry and Repository

Page 196 Discovering the Value of WebSphere Service Registry and Repository

5.6 Optional explorations

__1. Revoke the version 2.0 service so that neither service is online, and run select_online.mbtest. You should get the message: No matching services.

__2. Stop the WebSphere Service Registry and Repository server and run select_online.mbtest. (Only do this if you have plenty of time, because you will need to restart the server for the next lab.) You should get the message: Failure to retrieve Service from WebSphere Service Registry and Repository!

__3. If you have WebSphere Message Broker skills you may like to experiment with the RegistryLookup node.

Page 197: WSRR

Discovering the Value of WebSphere Service Registry and Repository IBM Software

Discovering the Value of WebSphere Service Registry and Repository Page 197

CONGRATULATIONS!

You have successfully completed Lab 5 - Version control with WebSphere Service Registry and Repository and WebSphere Message Broker

Page 198: WSRR

IBM Software

Page 198 Increase SOA Effectiveness Using WebSphere Service Registry and Repository

Appendix A. Notices This information was developed for products and services offered in the U.S.A.

IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to:

IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY 10504-1785 U.S.A.

For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to:

IBM World Trade Asia Corporation Licensing 2-31 Roppongi 3-chome, Minato-ku Tokyo 106-0032, Japan

The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you.

This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice.

Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk.

IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you.

Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have

Page 199: WSRR

IBM Software

Appendix Page 199

been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurements may have been estimated through extrapolation. Actual results may vary. Users of this document should verify the applicable data for their specific environment.

Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products.

All statements regarding IBM's future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only.

This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. All references to fictitious companies or individuals are used for illustration purposes only.

Page 200: WSRR

IBM Software

Page 200 Increase SOA Effectiveness Using WebSphere Service Registry and Repository

Appendix B. Trademarks and copyrights The following terms are trademarks of International Business Machines Corporation in the United States, other countries, or both:

IBM AIX CICS ClearCase ClearQuest Cloudscape

Cube Views DB2 developerWorks DRDA IMS IMS/ESA

Informix Lotus Lotus Workflow MQSeries OmniFind

Rational Redbooks Red Brick RequisitePro System i

System z Tivoli WebSphere Workplace System p

Adobe, Acrobat, Portable Document Format (PDF), and PostScript are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, other countries, or both.

Cell Broadband Engine is a trademark of Sony Computer Entertainment, Inc. in the United States, other countries, or both and is used under license therefrom.

Java and all Java-based trademarks and logos are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. See Java Guidelines

Microsoft, Windows, Windows NT, and the Windows logo are registered trademarks of Microsoft Corporation in the United States, other countries, or both.

Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

UNIX is a registered trademark of The Open Group in the United States and other countries.

Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.

ITIL is a registered trademark and a registered community trademark of the Office of Government Commerce, and is registered in the U.S. Patent and Trademark Office.

IT Infrastructure Library is a registered trademark of the Central Computer and Telecommunications Agency which is now part of the Office of Government Commerce.

Eclipse and BIRT are registered trademarks of the Eclipse Foundation, Inc.

Other company, product and service names may be trademarks or service marks of others.

Page 201: WSRR

NOTES

Page 202: WSRR

NOTES

Page 203: WSRR
Page 204: WSRR

© Copyright IBM Corporation 2012.

The information contained in these materials is provided for

informational purposes only, and is provided AS IS without warranty

of any kind, express or implied. IBM shall not be responsible for any

damages arising out of the use of, or otherwise related to, these

materials. Nothing contained in these materials is intended to, nor

shall have the effect of, creating any warranties or representations

from IBM or its suppliers or licensors, or altering the terms and

conditions of the applicable license agreement governing the use of

IBM software. References in these materials to IBM products,

programs, or services do not imply that they will be available in all

countries in which IBM operates. This information is based on

current IBM product plans and strategy, which are subject to change

by IBM without notice. Product release dates and/or capabilities

referenced in these materials may change at any time at IBM’s sole

discretion based on market opportunities or other factors, and are not

intended to be a commitment to future product or feature availability

in any way.

IBM, the IBM logo and ibm.com are trademarks or registered

trademarks of International Business Machines Corporation in the

United States, other countries, or both. If these and other IBM

trademarked terms are marked on their first occurrence in this

information with a trademark symbol (® or ™), these symbols

indicate U.S. registered or common law trademarks owned by IBM at

the time this information was published. Such trademarks may also be

registered or common law trademarks in other countries. A current

list of IBM trademarks is available on the Web at “Copyright and

trademark information” at ibm.com/legal/copytrade.shtml

Other company, product and service names may be trademarks or

service marks of others.