Cataloging IBM® WebSphere® MQ applications as services in IBM WebSphere Service Registry and Repository (hereafter called Service Registry) enables customers with existing investments in WebSphere MQ to leverage the capabilities of Service Registry to promote greater reuse, visibility, and manageability of these MQ applications. This article extends the work done in the IBM Redpaper Cataloging WebSphere MQ applications in WSDL for reuse in SOA and in the IBM article Take control of your MQ applications with WebSphere Service Registry and Repository.
In this article, you will learn how to define an MQ application as a service using the MQ Service Definition Wizard in WebSphere MQ Explorer, and how to load MQ Service definitions into Service Registry. The article will also describe the MQ objects and relationships between the various entities described in the MQ Service Definition document that are automatically built when MQ Service Definitions are loaded. Finally, the article will explain you can use Service Registry to catalog MQ Services, govern them as part of the service lifecycle, and perform impact analysis on the registry content.
WebSphere MQ and SOA governance
WebSphere MQ provides a flexible and robust messaging backbone with assured, once-only message delivery. WebSphere MQ (or MQSeries® as it was known in earlier versions) has been deployed for mission-critical financial transactions for more than a decade. Today, many organizations continue to make significant investments in MQ and many have MQ applications implemented throughout their enterprise. However, many of these MQ applications are not well documented or catalogued, and therefore their assets are often not easily available for reuse.
Meanwhile, organizations have looked to service registries and repositories like WebSphere Service Registry and Repository as a tool to enable SOA governance. However, a common requirement from many enterprises is to look beyond using the Service Registry purely as an enterprise tool for governing Web services. Because of the significant investment that they have made in existing non-Web services applications (including WebSphere MQ applications), they are often particularly interested in how they can extend Service Registry to manage these applications as well.
MQ Service Definition specification
The WebSphere MQ Service Definition specification provides a way to describe WebSphere MQ applications as services in the same format as traditional Web services, thus enabling you to manage WebSphere MQ applications as services. The WebSphere MQ Service Definition helps catalog and govern MQ applications by enabling the resources used by an application, such as queues and queue managers, to be easily queried, and for services to be looked up dynamically at runtime. Here is a sample MQ service definition:
Listing 1. Sample MQ service definition
<definitions ... xmlns:wmqservice="http://www.ibm.com/xmlns/prod/wmq/bindings/1.0" > <binding ... > <wmqservice:binding/> <wmqservice:format>MQSTR</wmqservice:format> <wmqservice:property>...</wmqservice:property> <operation ... > <input> <wmqservice:body /> </input> <output> <wmqservice:body /> </output> </operation> </binding> <port .... > <wmqservice:address location="wmq:/msg/queue/Qname"/> <wmqservice:connectQueueManager>Qmgr</wmqservice:connectQueueManager> <wmqservice:replyTo>msg/queue/QnameReply</wmqservice:replyTo> </port> </definitions> |
For more information about the MQ Service Definition specification, see the WebSphere MQ Service Definition Specification SupportPac. You can use the MQ Service Definition Wizard in the MQ Explorer in WebSphere MQ V7.0.0.1 to create MQ Service Definitions.
MQ integration feature in Service Registry
The Governance Profile available with WebSphere Service Registry and Repository V6.2.0.2 or later includes the WebSphere MQ Integration Feature. With this feature, the WSDL shredding capability of Service Registry is extended to provide WebSphere MQ WSDL parsing as well. After configuring the MQ Integration feature, when an MQ WSDL document is loaded, Service Registry automatically builds representations of MQ entities such as MQ queue managers, queues, and connections, as well as the relationships between these entities. For more details on the MQ Integration feature, see the WebSphere Service Registry and Repository information center.
These concepts can be illustrated with a scenario based on a fictitious insurance company. This insurance company has a distributed Customer Management and Insurance Premium application that uses WebSphere MQ to send messages from operators to back-end systems. Here is the logical architecture of the scenario:
Figure 1. Logical Architecture

In this scenario, the Call Center and Customer Account Maintenance client applications access information hosted by the Management and Insurance Premium application via queues hosted by two MQ queue managers: INS.PREMIUM.QM and INS.CRM.QM.
- UpdateCustomer Service -- A message is sent to the UpdateCustomer service to perform an update to customer records based on the content of the message.
- UpdatePremium Service -- A message is sent to the UpdatePremium service to perform an update to the Insurance Premium based on the content of the message.
- CalculatePremium Service -- A request message containing a query for the Insurance Premium Quotation is sent to the CalculatePremium service and the quote is sent back in a reply message.
The scenario was created with WebSphere MQ V7.0.0.1 and WebSphere Service Registry and Repository V6.2.0.2. This article assumes that:
- WebSphere MQ V7.0.0.1 has been installed and the following MQ objects created:
- MQ Queue Manager 1: INS.PREMIUM.QM
- MQ Queue Name: CALC.PREMIUM.REQ
- MQ Queue Name: CALC.PREMIUM.RESP
- MQ Queue Name: UPDATE.PREMIUM.REQ
- MQ Queue Manager 2: INS.CRM.QM
- MQ Queue Name: UPDATE.CUST.REQ
- WebSphere Service Registry and Repository V6.2.0.2 has been installed. The governance profile that includes the MQ Integration feature is provided with WebSphere Service Registry and Repository V6.2.0.2 or later.
Creating an MQ service definition in MQ Explorer
This section describes how you will be able to create an MQ Service based on the MQ service definition using the MQ Explorer Service Definition wizard, which is available with WebSphere MQ V7.0.0.1.
Adding a service definition repository
You must create a repository to store a service definition before a service definition can be created:
- Launch MQ Explorer.
- In the navigator view, right-click on Service Definition Repositories, then click Add Repository to open the Add New Service Definition Repository dialog:
Figure 2. Add Service Definition repository

- Type
MQ-WSRR Repositoryor any other name for the new repository. - Click Finish to close the dialog and create the new repository.
Creating a new service definition
Once you have created a repository in the Navigator view, create the Service Definition for the first MQ service, RequestQuoteService:
- Right-click on the repository that you have just created, then click New => New Service Definition to open the New Service Definition wizard.
- In the New Service Definition wizard, type
RequestQuoteServiceas the name and select Request-Response as the Message Exchange Pattern, as shown in Figure 3. Click Next:
Figure 3. Create new service definition

- Select MQ as the Binding Type and click Next.
- In the Navigator view, select Operation and type
RequestQuoteas the Operation name. In the comments field, typeGet a Quote for the Insurance Premium:
Figure 4. Define operation name

- Select Input destination in the navigator. In the Input destination name field, type
msg/queue/CALC.PREMIUM.REQ. - In the Destination queue manager name field, type
INS.PREMIUM.QM:
Figure 5. Define input destination

- Select Output destination in the navigator. In the Output destination name field, type
msg/queue/CALC.PREMIUM.RESP. - In the Destination queue manager name field, type
INS.PREMIUM.QM. Click Finish.
The message schema and the message header properties may be specified in the service definition as well for both input and output messages. The message schema describes the data format of the MQ messages, while the message header properties provides details of message attributes such as Message Id, Correlation Id, Message Persistence, and Codepages. For this scenario, the defaults are taken so no further configuration is required at this stage.
Viewing a service definition WSDL file
To view the contents of the WSDL service definition file:
- In the Content view, right-click on the newly created service definition and click View. By default, the WSDL service definition file opens in a new view next to the Navigator view.
- The contents of the WSDL service definition should be similar to Listing 2:
Listing 2. Insurance service MQ Service Definition
<xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://tempuri.org/RequestQuoteService"
xmlns:wmqservice="http://www.ibm.com/xmlns/prod/wmq/bindings/1.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="RequestQuoteService"
targetNamespace="http://tempuri.org/RequestQuoteService">
<message name="RequestQuote_Input">
<part name="RequestQuote_Input_Part" type="xsd:string"/>
</message>
<message name="RequestQuote_Output">
<part name="RequestQuote_Output_Part" type="xsd:string"/>
</message>
<portType name="RequestQuoteService_PortType">
<operation name="RequestQuote">
<input message="tns:RequestQuote_Input"/>
<output message="tns:RequestQuote_Output"/>
</operation>
</portType>
<binding name="RequestQuoteService_Wmq_Binding" type="tns:RequestQuoteService_PortType">
<wmqservice:binding/>
<operation name="RequestQuote">
<documentation>Get a Quote for the Insurance Premium</documentation>
<input>
<wmqservice:body/>
</input>
<output>
<wmqservice:body/>
</output>
</operation>
</binding>
<service name="RequestQuoteService">
<port binding="tns:RequestQuoteService_Wmq_Binding" name="RequestQuoteService_Wmq_Port">
<wmqservice:address location="wmq:/msg/queue/CALC.PREMIUM.REQ@INS.PREMIUM.QM"/>
<wmqservice:replyTo>wmq:/msg/queue/CALC.PREMIUM.RESP@INS.PREMIUM.QM</wmqservice:replyTo>
</port>
</service>
</definitions>
|
Creating the remaining service definitions
To create the service definition for the remaining MQ services, repeat the steps in the above section Creating a new Service Definition. Replace the properties defined with these:
Update Premium Service
- Name:
UpdatePremiumService - Message Exchange Pattern:
One-Way - Binding Type:
MQ - Operation name:
UpdatePremium - Comments:
Update Insurance Premium - Input destination name:
msg/queue/UPDATE.PREMIUM.REQ - Destination queue manager name:
INS.PREMIUM.QM
- Name:
Update Customer Record Service
- Name:
UpdateCustomerRecordService - Message Exchange Pattern:
One-Way - Binding Type:
MQ - Operation name:
UpdateCustomerRecord - Comments:
Update Customer Record - Input destination name:
msg/queue/UPDATE.CUST.REQ - Destination queue manager name:
INS.CRM.QM
- Name:
Exporting MQ service definitions
Now that all of the MQ service definitions has been created, they are ready to be exported. To export the contents of the WSDL service definition file:
- In the Content view, right-click the service definition repository created earlier and then click Export. A dialog opens to specify the name and location of the exported file.
- Ensure that all MQ service definitions created earlier have been selected as shown in Figure 6 below.
- Click Browse and select an export destination folder. Click OK:
Figure 6. Export service definition

Cataloging MQ service definitions in Service Registry
This section shows you how to store the MQ service definitions that have been created, and manage them as part of Service Registry.
Before the MQ service definitions are catalogued in Service Registry, you need to enable the governance profile. In Service Registry, the active configuration profile is the one that determines the current Service Registry configuration. To see which profile is active, perform the following actions in the Service Registry Web UI:
- Start the WebSphere Service Registry and Repository console (Web UI).
- Switch to the Configuration perspective if necessary: select Configuration in the Perspective list and click Go.
- Click Manage Configuration Profiles => Configuration Profiles. A list of all the configuration profiles stored in Service Registry is displayed. The entry for the active configuration profile has "Active" in the Status column. By default, the profile WSRR_Default_Profile_V62 has a status of "Active," meaning that it is the active configuration profile.
- Select the checkbox besides the WSRR_Governance_Profile_V62 configuration profile and click Make Active:
Figure 7. Enabling Governance Profile

Loading MQ service definition using the MQ Integration feature in Service Registry
After the WebSphere MQ integration feature has been configured, the MQ WSDL shredding capability is enabled. You will now load the MQ WSDL documents using the standard WSDL document loading mechanism. You can use the service definitions that you have created earlier or you can download service definitions that are provided with this article.
You load the service definitions individually. Proceed to load the service definition for the first MQ service, RequestQuoteService:
- Click Service Documents => Load Documents.
- Click Browse and select the WSDL document containing the MQ Service Definition, RequestQuoteService.wsdl.
- Select WSDL as the document type.
- Enter
Get a Quote for the Insurance Premiumas the document description. - Enter
1.0as the document version and click OK:
Figure 8 . Load Service Definition

- Click Add Another Document to add the remaining documents to the collection. Repeat steps 2 to 5 with the service definitions for UpdatePremiumService and UpdateCustomerRecordService.
- Click Finish after all of the MQ Service Definitions have been loaded, as shown below:
Figure 9. Load All Service Definition

Reviewing WebSphere MQ entities in Service Registry
After the MQ WSDL documents have been loaded, Service Registry automatically builds representation of the MQ entities.
- From the navigation tree, expand Business Metadata => Technical Service View.
- Expand the MQ Entities navigation tree element and click MQ Queue Managers. The collection view shows the MQ queue managers that were used by the MQ service definition that has just been loaded:
Figure 10. MQ Queue Managers

Cataloging MQ applications enable a better understanding of previously undocumented MQ applications. It increases the visibility and awareness that organizations have of their MQ applications.
- Select MQ Queue Managers => INS.PREMIUM.QM.
- Click Edit Classifications.
- From the classification tree, expand Governance Profile Taxonomy => Environment. Select the checkbox beside Production and click Add, then click OK:
Figure 11. Classifying MQ Queue Managers

- Repeat Steps 1 to 3 to classify INS.CRM.QM. This time, for environment, select Development instead.
- Select MQ Queue Managers from the MQ Entities navigation tree again. As it was previously, the list of available MQ queue managers are displayed.
- As show in Figure 12 below, now that the filters have identified, there are two categories of MQ Queue Managers, those that are operating in the development environment,
and the ones that are in the Production Environment. Click on Environment:
Figure 12. Categories of MQ Queue Managers

- Click on Production. Only the INS.PREMIUM.QM MQ Queue Manager is displayed now.
Classification systems in Service Registry enable organizations to segregate MQ services that are deployed in different environments. By classifying the MQ entities appropriately, you will be able to perform classification-based queries to identify candidate services for reuse. You can also set up Service Registry to restrict access based on classification.
Besides enabling classification systems, user-defined properties can also be used to tag MQ entities as a simple, unstructured, and untyped extension mechanism. Similar to classification systems, properties can be used in queries, and can help establish fine-grained access control.
Generating graphical views for impact analysis
The graphical Impact Analysis feature of Service Registry lets you quickly discover what applications, processes, or services are related to MQ services.
- Select MQ Queue Managers from the MQ Entities navigation tree and select the INS.PREMIUM.QM MQ queue manager from the list of MQ queue managers.
- From the INS.PREMIUM.QM properties page, click the Impact Analysis tab:
Figure 13. Specify dependency relationship

- In the Built-in relationships list, select WSDL service to WSDL port.
- In the Custom relationships list select the wsrrtm_requestQueue, wsrrtm_responseQueue, and wsrrtm_queueManager relationships.
Click Go. Here is a graphical view of the Impact Analysis result:
Figure 14. Impact Analysis of Premium Queue Managers

One possible goal of impact analysis is to determine what will be affected by a change to a particular artifact. Any changes to an MQ queue manager could have an impact on related artifacts. In this case, if INS.PREMIUM.QM is taken offline for maintenance, the RequestQuote and UpdatePremium services will be affected. When changes are made to MQ services, all consumers are notified using one of several options, such as JMS notifications or e-mail. The ability to analyze service dependencies is also useful when considering a service as a candidate for reuse.
Governing life cycle of MQ services
After MQ applications are registered in the Service Registry as services, you can start to govern the life cycle of MQ services. In this section, the RequestQuoteService is initiated into the service lifecycle. By governing the life cycle of MQ services, you can introduce, promote, and retire MQ services while making sure that each transition is validated according to organizational policies:
- From the Navigation Tree, expand Business Metadata => Governance Service View => Service Versions.
- Select RequestQuoteService and click the Governance tab.
- Select InitiateServiceVersionLifeCycle as the initial state transition and click Govern:
Figure 15. Initiate Service Version LifeCycle

The RequestQuoteService has now been initiated into the Service Version life cycle. Subsequent transitions in the life cycle can occur after the services are validated according to organization policies leveraging fine-grained, role-based access control and customizable validations. Governing the life cycle of MQ services using Service Registry enables organizations to ensure the quality and reliability of their MQ services for consumption across the organization. This governance helps ensure that the services are properly funded, owned, and deployed. Governing the life cycle of MQ services also enables service consumers to be notified whenever an MQ service is retired, or a version is deprecated.
This article used a scenario to describe how organizations can use WebSphere Service Registry and Repository to catalog existing MQ applications. It also introduced the new Service Definition Wizard in WebSphere MQ V7.0.0.1 and showed you how to use it in a real-life scenario.
The author would like to thank Mark Philips for reviewing this article and sharing his expertise.
| Description | Name | Size | Download method |
|---|---|---|---|
| MQ Service Definition Repository | MQ-WSRR-Repository.zip | 10 KB | HTTP |
Information about download methods
- WebSphere MQ developer resources page
Technical resources to help you design, develop, and deploy messaging middleware with WebSphere MQ to integrate applications, Web services, and transactions on almost any platform. - WebSphere MQ product page
Product descriptions, product news, training information, support information, and more. - WebSphere MQ V7 trial download
A no-charge trial download of WebSphere MQ V6. Includes limited online support for Windows® and Linux® installations at no charge during the trial period. - WebSphere MQ V6 information center
A single Web portal to all WebSphere MQ V6 documentation, with conceptual, task, and reference information on installing, configuring, and using your WebSphere MQ environment. - WebSphere MQ documentation library
WebSphere MQ product manuals. - WebSphere MQ support page
A searchable database of support problems and their solutions, plus downloads, fixes, problem tracking, and more. - WebSphere MQ public newsgroup
A non-IBM forum where you can get answers to your WebSphere MQ technical questions and share your WebSphere MQ knowledge with other users. - WebSphere MQ SupportPacs
Downloadable code, documentation, and performance reports for the WebSphere MQ family of products. - IBM Redpaper: Cataloging WebSphere MQ applications in WSDL for reuse in SOA
Discusses WebSphere MQ Service Definition Specification and the WebSphere MQ IRI Specification. - IBM SupportPac: WebSphere MQ Service Definition Specification
Contains the WebSphere MQ Service Definition specification, which defines how to represent WebSphere MQ applications as Web services using IRIs and WSDL. - IBM Redbook: WebSphere MQ V6 Fundamentals
Describes the fundamental concepts and benefits of message queuing technology. - IBM Redbook: WebSphere MQ V7 Features and Enhancements
Describes enhancements in WebSphere MQ V7 and the concepts you need to understand when developing applications that use the new features. - Marketing brochure: WebSphere MQ delivers real value today and tomorrow
Briefly summarizes the value of WebSphere MQ to your organization. - IBM white paper: Providing a messaging backbone for SOA connectivity
Provides a technical overview of how WebSphere MQ can provide the messaging backbone for SOA. - Download WebSphere MQ 7 Fix Pack
- Download WebSphere Service Registry and Repository V6.2.0 Fix Pack 2
- WebSphere Service Registry and Repository product page
Product descriptions, product news, training information, support information, and more. - WebSphere Service Registry and Repository information center
A single Web portal to all WebSphere Service Registry and Repository documentation, with conceptual, task, and reference information to help you install, configure, and use the product. - WebSphere Service Registry and Repository documentation library
WebSphere Service Registry and Repository announcement letters, demos, documentation, Redbooks, tutorials, Webcasts, and white papers. - WebSphere Service Registry and Repository requirements
Hardware and software requirements for WebSphere Process Server. - WebSphere Service Registry and Repository support
A searchable database of support problems and their solutions, plus downloads, fixes, problem tracking, and more. - IBM white paper: Take control of your MQ applications with WebSphere Service Registry and Repository
Describes the value of managing MQ applications with WebSphere Service Registry and Repository, and shows you how to avoid common pain points. - IBM demo: Govern MQ applications with WebSphere Service Registry and Repository
Shows how previously unmanaged and undocumented WebSphere MQ applications can be governed by WebSphere Service Registry and Repository. - developerWorks article: Introducing WebSphere Service Registry and Repository, Part 1: A day in the life of WebSphere Service Registry and Repository in the SOA life cycle
Describes basic WebSphere Service Registry and Repository concepts and capabilities. - developerWorks article: Introducing WebSphere Service Registry and Repository, Part 2: Architecture, APIs, and content
Describes WebSphere Service Registry and Repository capabilities, architecture, and governance model. - IBM Redbook: WebSphere Service Registry and Repository Handbook
Describes WebSphere Service Registry and Repository architecture and functions, and provides sample integration scenarios. - WebSphere SOA solutions developer resources page
Get technical resources for WebSphere SOA solutions. - developerWorks SOA and Web services zone
Technical resources for evaluating, planning, designing, and implementing solutions that involve SOA and Web services. - developerWorks WebSphere application connectivity zone
Access to WebSphere application connectivity (formerly WebSphere business integration) how-to articles, downloads, tutorials, education, product info, and more. - developerWorks WebSphere business process management zone
Access to WebSphere BPM how-to articles, downloads, tutorials, education, product info, and other resources to help you model, assemble, deploy, and manage business processes. - WebSphere business process management products page
For both business and technical users, a handy overview of all business process management products. - WebSphere forums
Product-specific forums where you can get answers to your technical questions and share your expertise with other WebSphere users. - Most popular WebSphere trial downloads
No-charge trial downloads for key WebSphere products. - Trial downloads for IBM software products
No-charge trial downloads for selected IBM® DB2®, Lotus®, Rational®, Tivoli®, and WebSphere® products. - Technical books from IBM Press
Convenient online ordering through Barnes & Noble. - developerWorks technical events and Webcasts
Free technical sessions by IBM experts that can accelerate your learning curve and help you succeed in your most difficult software projects. Sessions range from one-hour Webcasts to half-day and full-day live sessions in cities worldwide.

Alan Lim is a WebSphere Technical Specialist with IBM Software Group in Singapore. He works with clients in the financial services sector on the design and implementation of IBM middleware solutions. His areas of expertise include Business Process Management, Enterprise Application Integration, and SOA. Alan holds a Bachelor of Electrical Engineering (Honours) degree from the National University of Singapore (NUS). You can contact Alan at limkha@sg.ibm.com
Comments (Undergoing maintenance)





