Professional Documents
Culture Documents
Websphere Service Registry and Repository Handbook: Front Cover
Websphere Service Registry and Repository Handbook: Front Cover
WebSphere Service
Registry and Repository
Handbook
Best practices
SOA governance
Chris Dudley
Laurent Rieu
Martin Smithson
Tapan Verma
Byron Braswell
ibm.com/redbooks
SG24-7386-00
Note: Before using this information and the product it supports, read the information in
Notices on page xv.
Contents
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
The team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Part 1. SOA overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Chapter 1. Introduction to SOA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 Service-oriented architecture - a business view . . . . . . . . . . . . . . . . . . . . . 4
1.1.1 What is a service in service-oriented architecture? . . . . . . . . . . . . . 5
1.1.2 The SOA Foundation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.3 SOA lifecycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1.4 SOA reference architecture model . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.1.5 Supporting elements of the SOA reference architecture. . . . . . . . . . 14
1.2 Service-oriented architecture - an IT view . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.2.1 Definition of a service-oriented architecture . . . . . . . . . . . . . . . . . . . 18
1.2.2 SOA terms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.2.3 Drivers for SOA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.2.4 What is a service? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.2.5 Web services and SOA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.2.6 Core technologies of Web services. . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.2.7 Enterprise Service Bus and SOA . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.2.8 Definition of an Enterprise Service Bus. . . . . . . . . . . . . . . . . . . . . . . 30
1.2.9 Enterprise requirements for an ESB . . . . . . . . . . . . . . . . . . . . . . . . . 32
1.2.10 Service registry and repository in an SOA . . . . . . . . . . . . . . . . . . . 34
1.3 SOA governance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
1.3.1 What is SOA governance? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
1.3.2 SOA governance in practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
1.3.3 Aspects of SOA governance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
1.4 SOA summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Part 2. WSRR concepts and architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Chapter 2. Concepts and architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
2.1 Overview of WebSphere Service Registry and Repository . . . . . . . . . . . . 54
2.1.1 What is WebSphere Service Registry and Repository? . . . . . . . . . . 55
iii
iv
Contents
vi
Contents
vii
viii
Contents
ix
Contents
xi
xii
Contents
xiii
xiv
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 give 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.
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.
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.
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.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs in
any form without payment to IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating platform for which the
sample programs are written. These examples have not been thoroughly tested under all conditions. IBM,
therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.
xv
Trademarks
The following terms are trademarks of the International Business Machines Corporation in the United States,
other countries, or both:
alphaWorks
developerWorks
i5/OS
z/OS
z/VSE
zSeries
z9
AIX
Candle
ClearCase
CICS
DataPower
Domino
DB2 Universal Database
DB2
IBM
IMS
MQSeries
NetView
OMEGAMON Monitoring Agent
OMEGAMON
OS/2
Passport Advantage
Rational
Redbooks
Redbooks (logo)
RACF
REXX
SupportPac
System z
Tivoli Enterprise
Tivoli Enterprise Console
Tivoli
TXSeries
WebSphere
xvi
Preface
Service-oriented architecture offers the promise of business agility and resilience
through reuse, loose coupling, flexibility, interoperability, integration and
governance. These are realized by separating service descriptions from their
implementations, and using this descriptive metadata across the service
lifecycle. Standards-based service metadata artefacts, such as Web Service
Description Language (WSDL), XML schema, policy or Service Component
Architecture (SCA) documents, capture the technical details of what a service
can do, how it can be invoked, or what it expects other services to do. Semantic
annotations and other metadata can be associated with these artefacts to offer
insight to potential users of the service about how and when it can be used, and
what purposes it serves.
A service registry and repository handles the management of service
descriptions and serves as the system of record for this information throughout
the complete lifecycle of a service.
IBM WebSphere Service Registry and Repository is the master metadata
repository for service interaction endpoint descriptions. Because WebSphere
Service Registry and Repository is the integration point of service metadata, it
establishes a central point for finding and managing service metadata. Once
service metadata is placed in WebSphere Service Registry and Repository,
visibility is controlled, versions are managed, proposed changes are analyzed
and communicated, and usage is monitored.
This IBM Redbook discusses the architecture and functions of IBM WebSphere
Service Registry and Repository along with sample integration scenarios that
can be used as examples for implementing WebSphere Service Registry and
Repository in a customer service-oriented architecture environment.
xvii
The team
xviii
Before joining IBM, he worked for one year as Technical Support for Socit
Gnrale in New York City, USA. He graduated (MS) from Ecole Suprieure
dElectricit in 1998.
Martin Smithson is a Senior IT Specialist working on the WebSphere Service
Registry and Repository product at IBM laboratory in Hursley, England. He has
11 years of experience working in the IT industry, five of which he spent working
as a technical consultant for the EMEA IBM Software Services for WebSphere
team. His areas of expertise include the architecture, design, and development of
J2EE applications; he is also an expert on IBM WebSphere Application Server.
He has authored several developerWorks articles and co-authored several
Redbooks: WebSphere Application Server V6 System Management and
Configuration Handbook, SG24-6451, WebSphere Application Server V6.1:
System Management and Configuration, SG24-7304, and CCF Connectors and
Database Connections Using WebSphere Advanced Edition Connecting
Enterprise Information Systems to the Web, SG24-5514. Martin also developed
the IBM Client Application Tool for JMS that is available for download from IBM
alphaWorks Web site.
Tapan Verma is an Advisory IT Specialist at IBM Software Services for
WebSphere in India. He has more than 10 years of experience in the IT Industry,
five of those years working with IBM Software Group in India on WebSphere
consultancy, designing, integration, installation, configuration, and
troubleshooting. His areas of expertise include WebSphere Application Server,
WebSphere Process Server and WebSphere Enterprise Service Bus. He has
product certifications on WebSphere Application Server, WebSphere Process
Server, WebSphere Studio Application Developer and DB2. He also conducts
training and workshops about WebSphere and related topics.
Thanks to the following people for their contributions to this project:
Carla Sadtler
Margaret Ticknor
Linda Robinson
Carolyn Sneed
Tamikia Barrow
ITSO, Raleigh Center
Mark Allman
IBM United Kingdom, Software Group, WebSphere ESB Development
Janet S. Andersen, Rohit I. Badlaney
IBM RTP, Software Group, ITCAM for SOA Development
Tom Bailey, Tim Baldwin, Rob Breeds, Steven Gallacher, Ian Heritage, Chris
Jenkins, Kevin Marsh, Jamie Orchard, Mike Ricketts, Phil Rowley, Andrew
Preface
xix
Rutherford, Dave Seager, Ian Shore, Philip Taunton, Gary Whittingham, Stephen
Willoughby
IBM United Kingdom, Software Group, WebSphere Service Registry and
Repository Development
Duncan Clark, John Colgrave, Barbara McKee
IBM United Kingdom, Software Group, Service Registry Chief Architect
Kim Clark
IBM United Kingdom, Software Group, WebSphere SOA Foundation Product
Specialist
Mark Cocker, Daniel Millwood, Peter Seddon
IBM United Kingdom, Software Group, IBM CICS Development
David Currie
IBM United Kingdom, Software Group, Senior IT Specialist, Pan-IOT Software
Lab Services Software Development Engineer
Arnauld Desprets, Michael Ellis, Bobby Woolf
IBM Software Services for WebSphere
Lisbeth Dineen
IBM Pittsburgh, Software Group, WebSphere Process Integration Technical
Enablement and Support Planning
Raymond Ellis, Subhash Kumar, Bob Patten
IBM United States, Software Group, SOA Advanced Technology US Design
Center
Guy Hochstetler
IBM USA, Software Group, Consulting I/T Specialist
David D. H. Lin
IBM Austin, Software Group, Tivoli Argus Lead Architect
Sunil Murthy
IBM San Jose, Software Group, Product Management, WSRR
Simon Rachman
IBM United Kingdom, Software Group, Service Registry Development Manager
Rosalind Radcliffe
IBM RTP, Software Group, SOA Management Architect
xx
Comments welcome
Your comments are important to us!
We want our Redbooks to be as helpful as possible. Send us your comments
about this or other Redbooks in one of the following ways:
Use the online Contact us review redbook form found at:
ibm.com/redbooks
Send your comments in an email to:
redbooks@us.ibm.com
Mail your comments to:
IBM Corporation, International Technical Support Organization
Dept. HYTD Mail Station P099
2455 South Road
Poughkeepsie, NY 12601-5400
Preface
xxi
xxii
Part 1
Part
SOA overview
Chapter 1.
Introduction to SOA
Service-oriented architecture (SOA) is an approach to defining integration
architectures that are based on the concept of a service. Applications collaborate
by invoking each others services, and services can be composed into larger
sequences to implement business processes.
This chapter introduces service-oriented architecture from a business
perspective and from an IT perspective in the following sections:
1.1, Service-oriented architecture - a business view on page 4
1.2, Service-oriented architecture - an IT view on page 18
1.3, SOA governance on page 40
a repeatable task within a business process. So, if you can identify your
business processes, and within that, the set of tasks that you perform within the
process, then you can claim that the tasks are services and the business process
is a composition of services.
However, note that certain tasks can be decomposed into business processes in
their own right. The order-entry process includes, amongst other things, a task to
confirm availability of the items being ordered. The confirm-availability task is
itself a business process that includes, for example, the tasks of checking the
on-hand inventory, verifying the supply pipeline, and possibly creating a
background request and determining its availability. Thus, business processes
are themselves services; there is a principle of recursive decomposition implied
in the term service. If taken far enough we could easily claim that everything is a
service. This, obviously, is not useful at some point treating everything as a
service would yield an incredibly inefficient over-generalization of the problem
space. You should exercise this principle of recursive decomposition only to the
extent that you legitimately need flexibility within your business design.
From this definition of service, service-orientation is a way of integrating your
business as a set of linked services. If you can define the services in each of your
vertical and horizontal lines-of-business, you can begin to link those LOBs by
composing their services into larger business processes. Likewise, you can
decompose the main services of your LOBs into a set of more basic services that
can then be easily recomposed either to change LOB processes, or to interlink
your LOBs at a lower level of their capabilities. Similarly, you can use the same
principles of composition to create links with your business partners to both
automate those relationships and to gain more efficiency from them. One
consequence of service orientation is flexibility: you gain the ability to iteratively
optimize your business design, unhampered by inflexible IT structures.
A service-oriented architecture, then, is an architectural style for creating an
Enterprise IT Architecture that exploits the principles of service-orientation
to achieve a tighter relationship between the business and the information
systems that support the business.
Model
Modeling is the process of capturing your business design from an
understanding of business requirements and objectives and translating that into
a specification of business processes, goals and assumptions creating an
encoded model of your business.
Capturing your business design using a rigorous approach offers the potential to
gain better insight into your business, by, for example using tools to reason about
the design and its supporting rationale. In particular, we can use the model to
simulate how your business processes will actually run. A sophisticated modeling
approach lets you perform what-if scenarios that reflect your understanding of
the actual number of process instances, contacts, quantities, incoming traffic,
and so on, that you may experience in your business. The process can then be
simulated using those parameters to predict the effect that process will have on
your business and on your IT systems. If you do not achieve the intended results
then you can change your process definition to try to improve your results. You
can go on to refine your processes as you have modeled them to optimize your
business performance even before ever investing in an implementation of those
processes.
Your model will also capture key performance indicators business metrics that
are important measurements of your business. This could include, for example, a
measure of the new accounts that you have opened in a given month. These key
performance indicators are input to the assembly of your application and later,
when the application is in production, collected and reported back to you. You will
be able to use that information to determine how well your business is
performing. You can use the correlation between your business design in your
actual implementation in the information system to determine whether
bottlenecks in your performance are due to limitations in your business design or
limitations in the information system that automates your design.
For more information, go to the following Web site:
http://www.ibm.com/developerworks/webservices/library/ws-soa-design1
Assemble
You can use your business design to communicate with the IT organization to
assemble the information system artefacts that will implement the business
design. The enterprise architect working with the business analyst can begin to
convert the business design into a set of business process definitions and
activities deriving the required services from the activity definitions. They can
work with the software architect to flesh out the design of the services.
During the process of resolving a design and implementation of your modeled
business processes and services, you should search your existing asset
inventories your existing programs to find application components that
already meet your needs. Some application components will fit perfectly; some
will have to be re-factored; and some will have to be augmented to meet the
requirements of the design. These existing assets should be rendered as
services for assembly into composite applications.
It is also possible that some of your existing applications are so heavily bound
into a tight relationship with presentation and data logic and other business
functions that you simply cannot extract any re-usable componentry from those
programs. In these cases you will have to decide whether and how to rewrite
these functions as new services, and how to migrate the processes that depend
on those old programs.
Any new services required by the business design will have to be created.
Software developers should use the SOA programming model to create these
new services.
Final assembly includes applying the set of policies and conditions to control how
your applications operate in your production environment. This might include, for
example, business and government regulations, but can also include critical
operational characteristics such as packaging, localization constraints, resource
dependency, integrity control, and access protection.
For more information, go to the following Web sites:
http://www.ibm.com/developerworks/websphere/library/techarticles/051
1_flurry/0511_flurry.html
http://www.ibm.com/developerworks/webservices/library/ws-soa-enter4/
index.html
Deploy
The deploy phase of the lifecycle includes a combination of creating the hosting
environment for your applications and the actual deployment of those
applications. This includes resolving the applications resource dependencies,
operational conditions, capacity requirements, and integrity and access
constraints.
A number of concerns are relevant to construction of the hosting environment
including the presence of the already existing hosting infrastructure supporting
existing applications and pre-existing services. Beyond that, you need to
consider appropriate platform offerings for hosting your user interaction logic,
business process flows, business-services, access services, and information
logic.
You need to consider the techniques you will employ for ensuring availability,
reliability, integrity, efficiency, and service ability.
For more information, go to the following Web sites:
http://www.ibm.com/developerworks/webservices/library/ws-soa-enter1/
http://www.ibm.com/developerworks/webservices/library/ws-enter5/inde
x.html
http://www.ibm.com/developerworks/library/ws-soa-enter6/index.html
Manage
Turning now to the manage phase of the lifecycle, you need to consider how to
maintain the operational environment and the policies expressed in the assembly
of the SOA applications deployed to that environment. This includes monitoring
performance of service requests and timeliness of service responses;
maintaining problem logs to detect failures in various system components;
detecting and localizing those failures; routing work around them; recovering
work affected by those failures; correcting problems; and restoring the
operational state of the system.
The manage phase also includes managing the business model tuning the
operational environment to meet the business objectives expressed in the
business design, and measuring success or failure to meet those objectives.
SOA is distinguished from other styles of enterprise architecture by its correlation
between the business design and the software that implements that design, and
its use of policy to express the operational requirements of the business services
and processes that codify the business design. The manage phase of the
lifecycle is directly responsible for ensuring those policies are being enforced,
and for relating issues with that enforcement back to the business design.
Managing the system also involves performing routine maintenance,
administering and securing applications, resources and users, and predicting
future capacity growth to ensure that resources are available when the demands
of the business call for it.
For more information, go to the following Web sites:
http://www.ibm.com/developerworks/webservices/library/ws-sla4/
10
http://www.ibm.com/software/tivoli/products/composite-application-mg
r-soa/
http://www.ibm.com/software/tivoli/solutions/application-management/
http://www.ibm.com/software/tivoli/products/prov-mgr/
http://www.ibm.com/software/tivoli/products/identity-mgr/
Lifecycle flow
Progression through the lifecycle is not entirely linear. In fact, changes to key
performance information in the Model phase often need to be fed directly in to
the Management phase to update the operational environment. Constraints in
the Deploy phase, such as limiting assumptions about where resources are
located in the system, may condition some of the Assembly phase decisions.
And, occasionally, information technology constraints established in the
Assembly phase will limit the business design created during the Model phase
for example, the cost of wide-area wireless communication with remote hand
held devices may be prohibitive to deploying a field force to rural locations and
therefore needs to be reflected back into the business design.
11
Integrated
environment
for design
and creation
of solution
assets
Interaction Services
Process Services
Information Services
Enable collaboration
between people,
processes & information
Orchestrate and
automate business
processes
Manages diverse
data and content in a
unified manner
ESB
IT Service
Management
Development
Services
Security
Policy
Partner Services
Access Services
Build on a robust,
scaleable, and secure
services environment
Facilitate interactions
with existing information
and application assets
IT
Monitoring
Infrastructure Services
Optimizes throughput,
availability and performance
Interaction Services
Interaction services are about the presentation logic of the business design
components that support the interaction between applications and end-users.
Also we recognize that interactions with the external world are not limited to just
interactions with humans. In some cases, interaction logic orchestrates the
interface to industrial robots, vehicles, sensors, RFID devices, environmental
control systems, process control equipment, and so on.
Process Services
Process services include various forms of compositional logic the most notable
of which are business process flows and business state machines (finite-state
machines for business composition). We consider both kinds of composition
mechanisms, plus other forms such as business rules and decision tree
processing, as well as more ad-hoc forms of composition, to be equally valid
approaches to choreographing service composition.
12
For more information about this topic, see the following Web sites:
http://www.ibm.com/developerworks/webservices/library/ws-choreograph
y/index.html
http://www.ibm.com/developerworks/library/ws-soa-progmodel3/
Information Services
Information services contain the data logic of your business design. This logic
exists at two levels. On the surface, information services provide access to the
persistent data of your business. This can include query statements for retrieving
the information you care about or referential integrity checks on the information
manipulated by these services. These data services are available to the business
application as services often constructed with specific domain model
semantics so that they appear for all intents and purposes as business
application services.
For more information, go to the following Web site:
http://www.ibm.com/developerworks/webservices/library/ws-soa-ims2/in
dex.html
Access Services
Access services are dedicated to integrating existing applications and functions
into the service-oriented architecture. This includes simple wrapping of those
functions and rendering them as services (in the case where the existing function
is a good match with the semantic requirements of the business model in which it
will be used), or in more complex cases augmenting the logic of the existing
function to better meet the needs of the business design. In the latter case, the
access service may in fact invoke multiple current functions to achieve the
semantic requirements of the service. In other architectures we have often
referred to these access services as adapters.
For more information, go to the following Web site:
http://www.ibm.com/developerworks/webservices/library/ws-buildebay/
13
Partner Services
Partner services capture the semantics of partner interoperability that have a
direct representation in the business design. This can, for example, include the
policies and constraints that other businesses must conform to work with your
business including business vertical requirements such as the need to conform
to specific industry message and interchange standards like EDIFACT, SWIFT,
RosettaNet, and so on. It can involve the business logic of managing how
partners are selected, and which ones are used as a preference over others in
particular circumstances.
Integrated
environment
for design
and creation
of solution
assets
Interaction Services
Process Services
Information Services
Enable collaboration
between people,
processes & information
Orchestrate and
automate business
processes
Manages diverse
data and content in a
unified manner
ESB
Registry/Repository
Security
Policy
Partner Services
Access Services
Build on a robust,
scaleable, and secure
services environment
Facilitate interactions
with existing information
and application assets
Infrastructure Services
Optimizes throughput,
availability and performance
Figure 1-3 SOA reference architecture model with registry and repository
14
IT Service
Management
Development
Services
IT
Monitoring
Registry/Repository
Like the Enterprise Service Bus, service registry and repository is a silent partner
in the SOA reference architecture. Note the highlighted Registry/Repository
function in Figure 1-3 on page 14. Even though Figure 1-3 on page 14 makes it
appear that the service registry and repository function is part of the Enterprise
Service Bus, it is not. The service registry and repository function is a separate
entity from the Enterprise Service Bus.
A service registry and repository handles the management of service
descriptions and serves as the system of record for this information throughout
the complete lifecycle of a service. The service registry and repository is used to
find, publish, manage and subscribe to services with the assurance that the
underlying policies associated with correct usages of these services are enforced
and governed. It supports the following functions:
15
Find
Publish
Subscribe
Manage
In the Model phase (refer to Model on page 8) and Assemble phase (refer to
Assemble on page 8), the service registry and repository serves two main
functions. First the service registry and repository can store or capture the
interfaces and messages used by a new service when it is modeled, or a
composite service or process when it is assembled. Second, the service registry
and repository makes the service information searchable to encourage reuse of
common services. A common example of service information gathered or
searched in these phases would be documents conforming to the Web Services
Description Language (WSDL) or XML Schema Definition (XSD) standards.
Architects and developers can also annotate this technical information in the
registry and repository with extra information using formal classification
techniques, such as using the Web Ontology Language (OWL) standard, or by
adding other content defined following XSD standards. Such classification of
services allows for meaningful groupings of the services based on business
objectives.
The service Deployment phase (refer to Deploy on page 9) adds additional
information to the service registry and repository including the connectivity,
security and reliability characteristics of the deployed service. This extra
information builds on the information from the Model and Assembly phases and
differentiates each deployed service instance in the service-oriented
architecture. The deployment information may be expressed in terms of new
WSDL content or through the use of policy statements defined using the
WS-Policy specifications.
In Deploy and Manage phases of the lifecycle, the service registry and repository
serves as a point of integration for the SOA environment by reflecting a system of
record for each deployed service. The relationships, dependencies and
interaction of the services can be documented and exploited in these phases.
See 1.2.10, Service registry and repository in an SOA on page 34 for additional
information.
16
IT Service Management
Once your application has been deployed to the information system, it needs to
be managed along with the IT infrastructure on which it is hosted. IT service
management represents the set of management tools used to monitor your
service flows, the health of the underlying system, the utilization of resources, the
identification of outages and bottlenecks, the attainment of service goals, the
enforcement of administrative policies, and recovery from failures.
17
Infrastructure Services
Infrastructure services form the core of the information technology environment
for hosting SOA applications. It is through these services that we are able to build
a reliable system to provide efficient utilization of resources, ensure the integrity
of the operational environment, balance workload to meet service level
objectives, isolate work to avoid interference, perform maintenance, secure
access to confidential business processes and data, and simplify overall
administration of the system.
Component model
Service-oriented architecture is a component model that interrelates an
applications different functional units, called services, through well-defined
interfaces and contracts between these services. The interface is defined in a
neutral manner that should be independent of the hardware platform, the
operating system, and the programming language in which the service is
implemented. This allows services, built on a variety of such systems, to interact
with each other in a uniform and universal manner.
This feature of having a neutral interface definition that is not strongly tied to a
particular implementation is known as loose coupling between services. The
benefit of a loosely-coupled system is its agility and ability to survive evolutionary
changes in the structure and implementation of the internals of each service that
makes up the whole application.
18
Application architecture
Service-oriented architecture is an application architecture in which all functions,
or services, are defined using a description language and have invocable
interfaces that are called to perform business processes. Each interaction is
independent of each and every other interaction and the interconnect protocols
of the communicating devices (that is, the infrastructure components that
determine the communication system do not affect the interfaces). Because
interfaces are platform-independent, a client from any device using any operating
system in any language can use the service.
Though built on similar principles, SOA is not the same as Web services, which
indicates a collection of technologies, such as SOAP and XML. SOA is more
than a set of technologies and runs independent of any specific technologies.
Integration architecture
Service-oriented architecture is an integration architecture approach based on
the concept of a service. The business and infrastructure functions that are
required to build distributed systems are provided as services that collectively, or
individually, deliver application functionality to either end-user applications or
other services.
SOA specifies that within any given architecture, there should be a consistent
mechanism for services to communicate. That mechanism should be coupled
loosely and should support the use of explicit interfaces.
19
a service?
service orientation?
A repeatable
business task e.g.,
check customer credit;
open new account
service oriented
architecture (SOA)?
a composite
application?
An IT architectural
style that supports
service orientation
20
Service
Registry
Discover
Service
Consumer
Application-A
- Travel Agent
- Retail Bank
- Publishing House
Flight Reservation
Car Hire
Hotel Booking
Mortgage Lending
Office Supplies
1
Invoke
Request/Response
Publish
Service
Provider
Application-B
- Airline/Car Rental/Hotel Chain
- Mortgage Specialist/Investment Banks
- Office Supplies Company
The service provider creates a service and in some cases publishes its interface
and access information to a service registry.
Each provider must decide which services to expose, evaluate trade-offs
between security and easy availability, determine how to price the services or
determine how to exploit the value of the services if they are free. The provider
also has to decide in which category the service should be listed, and what sort
of trading partner agreements are required to use the service.
21
The service registry is responsible for making the service interface and
implementation access information available to service consumers. This is a
searchable registry of service descriptions where service providers publish their
service descriptions. Service requestors find services and obtain binding
information (in the service descriptions) for services during development for
static binding, or during execution for dynamic binding. For statically bound
service requestors, the service registry is an optional role in the architecture,
because a service provider can send the description directly to service
requestors. Likewise, service requestors can obtain a service description from
other sources besides a service registry, such as a local file, FTP site, Web site,
and so on.
The implementers of a service registry must consider the scope with which the
registry will be implemented. For example, there are public service registries
available over the Internet to an unrestricted audience, as well as private service
registries that are only accessible to users within a company-wide intranet.
See Registry/Repository on page 15 and 1.2.10, Service registry and
repository in an SOA on page 34 for additional information.
The purpose of this redbook is to focus on the IBM service registry product,
WebSphere Service Registry and Repository. For more detailed information
about WSRR, see Part 2, WSRR concepts and architecture on page 51.
The service consumer locates (discovers) entries in the service registry and then
binds to the service provider in order to invoke the defined service.
22
23
SYSTEM 1
Internal code
and process
INTERFACE
Internal code
and process
SYSTEM 2
24
25
Core elements
The following are the core technologies used for Web services.
Extensible Markup Language (XML)
XML is the markup language that underlies most of the specifications used for
Web services. XML is a generic language that can be used to describe the
content in a structured way, separated from its presentation to a specific
device.
26
27
28
Integrated
environment
for design
and creation
of solution
assets
Interaction Services
Process Services
Information Services
Enables collaboration
between people,
processes & information
Orchestrate and
automate business
processes
Manages diverse
data and content in a
unified manner
ESB
IT Service
Management
Partner Services
Access Services
Build on a robust,
scaleable, and secure
services environment
Facilitate interactions
with existing information
and application assets
Apps &
Info Assets
Development
Services
Manage
and secure
services,
applications
&
resources
Infrastructure Services
Optimizes throughput,
availability and performance
The need for an ESB can be seen by considering how it supports the concepts of
SOA implementation by:
Decoupling the consumers view of a service from the actual implementation
of the service
Decoupling technical aspects of service interactions
Integrating and managing services in the enterprise
Decoupling the consumers view of a service from the actual implementation
greatly increases the flexibility of the architecture. It allows the substitution of one
service provider for another (for example, because another provider offers the
same services for lower cost or with higher standards) without the consumer
being aware of the change or without the need to alter the architecture to support
the substitution.
This decoupling is better achieved by having the consumers and providers
interact via an intermediary. Intermediaries publish services to consumers. The
consumer binds to the intermediary to access the service, with no direct coupling
to the actual provider of the service. The intermediary maps the request to the
location of the real service implementation.
In an SOA, services are described as being loosely coupled. However, at
implementation time, there is no way to loosely couple a service or any other
29
30
implemented centrally within the bus instead of having this buried within the
applications.
Integrating and managing services in the enterprise outside of the actual
implementation of the services in this way helps to increase the flexibility and
manageability of SOA.
The primary driver for an ESB, however, is that it increases decoupling between
service consumers and providers. Protocols such as Web services define a
standard way of describing the interface to a service provider that allow some
level of decoupling (as the actual implementation details are hidden). However,
the protocols imply a direct connection between the consumer and provider.
Although it is relatively straight forward to build a direct link between a consumer
and provider, these links can lead to an interaction pattern that consists of
building multiple point-to-point links that perform specific interactions. With a
large number of interfaces this quickly leads to the build up of a complex
spaghetti of links with multiple security and transaction models. Routing control is
distributed throughout the infrastructure, and probably no consistent approach to
logging, monitoring, or systems management is implemented. This environment
is difficult to manage or maintain and inhibits change.
A common approach to reducing this complexity is to introduce a centralized
point through which interactions are routed, as shown in Figure 1-9.
Hub and Spoke
Direct Connection
Service
Consumer
Service
Provider
Service
Consumer
Service
Consumer
Service
Provider
Service
Consumer
Service
Consumer
Service
Provider
Service
Consumer
Service
Provider
Hub:
ESB
Service
Provider
Service
Provider
31
Note that the benefit of reducing the number of connections only truly emerges if
the application interfaces and connections are genuinely reusable. For example,
consider the case where one application needs to send data to three other
applications. If this is implemented in a hub, the sending application must define
a link to the hub, and the hub must have links that are defined to the three
receiving applications, giving a total of four interfaces that need to be defined. If
the same scenario was implemented using multiple point-to-point links, the
sending application would need to define links to each of the three receiving
applications, giving a total of just three links. A hub only offers the benefit of
reduced links if another application also needs to send data to the receiving
applications and can make use of the same links as those that are already
defined for the first application. In this scenario, the new application only needs to
define a connection between itself and the hub, which can then send the data
correctly formatted to the receiving applications.
Hubs can be federated together to form what is logically a single entity that
provides a single point of control but is actually a collection of physically
distributed components. This is commonly termed a bus. A bus provides a
consistent management and administration approach to a distributed integration
infrastructure.
32
SOA applications are built from services. Typically, a business service relies on
many other services in its implementation. The ESB is the component that
provides access to the services and so enables the building of SOA applications.
Mediation support
The ESB is more than just a transport layer. It must provide mediation support to
facilitate service interactions (for example, to find services that provide
capabilities for which a consumer is asking or to take care of interface
mismatches between consumers and providers that are compatible in terms of
their capabilities). It must support a variety of ways to get on and off the bus,
such as adapter support for existing applications or business connections, that
enable external partners in business-to-business interaction scenarios. To
support these different ways to get on and off the bus, it must support service
interaction with a wide variety of service endpoints. It is likely that each endpoint
will have its own integration techniques, protocols, security models and so on.
This level of complexity should be hidden from service consumers. They need to
be offered a simpler model. In order to hide the complexity from the consumers,
the ESB is required to mediate between the multiple interaction models that are
understood by service providers and the simplified view that is provided to
consumers.
33
Protocol independence
As shown in Figure 1-10 on page 33, services can be offered by a variety of
sources. Without an ESB infrastructure, any service consumer that needs to
invoke a service needs to connect directly to a service provider using the
protocol, transport, and interaction pattern that is used by the provider. With an
ESB, the infrastructure shields the consumer from the details of how to connect
to the provider.
In an ESB, there is no direct connection between the consumer and provider.
Consumers access the ESB to invoke services, and the ESB acts as an
intermediary by passing the request to the provider using the appropriate
protocol, transport, and interaction pattern for the provider. This intermediary
connection enables the ESB to shield the consumer from the infrastructure
details of how to connect to the provider. The ESB should support several
integration mechanisms, all of which can be described as invoking services
through specific addresses and protocols, even if in some cases the address is
the name of a CICS transaction and the protocol is a J2EE resource adapter
integrating with the CICS Transaction Gateway. By using the ESB, the
consumers are unaware of how the service is invoked on the provider.
Because the ESB removes the direct connection between service consumer and
providers, an ESB enables the substitution of one service implementation by
another with no effect to the consumers of that service. Thus, an ESB allows the
reach of an SOA to extend to non-SOA enabled service providers. It can also be
used to support migration of the non-SOA providers to using an SOA approach
without impacting the consumers of the service.
34
Service
Development
Lifecycle
Model
Service Endpoint
Registries /
Repositories
Build
Discover
Assemble
Change and
Release
Management
ESB
Operational
Efficiency and
Resilience
Test
Manage
Mediate
Bind
Deploy
Runtime Integration
35
36
Service
Consumer
Information on
Provided
Services
Service
Registry
& Repository
Consume
Services
Service
Provider
Register
Provided
Services
Observe &
Manage
Services
Information on
Registered
Services
Information on
Operational
Services
Monitoring &
Management
Figure 1-12 Service registry and repository and SOA management components
37
Figure 1-13 abstracts away the notion of Service Consumer and rather focusses
on the other relevant roles.
Service
Provider
Provided
services are
registered in
SRR
Services are
observed by
the Monitoring
and
Management
infrastructure
Information on
registered services is
made available
Service
Registry
& Repository
Monitoring &
Management
Operational data on
observed services
is fed back
Information on registered
services is reconciled with that
collected from observed
services and is used to
augment the understanding of
the management domain
Figure 1-13 The role of service registry and repository in SOA management
Registered services are managed in the service registry and repository. This
information is accessed by multiple actors, including the Service Provider
(registering services) and the Service Consumer (looking for services to
consume).
The Monitoring and Management infrastructure uses this information about
registered services to enhance its understanding of the topology and
characteristics of the services in the monitored SOA. Such information can
include immediate details on service endpoints. It can also consist of some
meaningful description of service interfaces and behavior, or it can provide a
38
formal description of relationships across services and other SOA citizens such
as business processes, consumers and providers. Based on this information the
Monitoring and Management infrastructure can enhance its view of the managed
resources and their topologies.
The Monitoring and Management infrastructure then feeds back some
operational data it collects about the observed services to the service registry
and repository. This data has been captured and collected at runtime by the
observation points from the running services that are part of the managed
resources. Various elements of the runtime behavior of the services can be
collected, such as the average response time, the fault rate, the size and
frequency of the messages, and so on.
These operational elements are used to further enrich the service information
model managed by the service registry and repository, therefore allowing other
actors in the SOA to use this information. For example, ESB infrastructures could
use indications on the observed quality of interaction a service supports (average
response time, fault rate, availability...) to perform smart routing decisions to the
best available service. The same reasoning could be applied to any service
consumers which would base their consumption decisions on the observed
operational behavior of the service. Another example could be when planning for
the migration of services based on their utilization.
This collaboration between the service registry and repository and the SOA
management infrastructure expands the management domain so that it can
embrace the overall service lifecycle and reflect the operational dimension of the
services as first class citizen in an SOA environment.
Note: Figure 1-13 on page 38 does not include any integration fabric
middleware such as the ESB. However, it is arguable that, at a conceptual
level, such a component can be considered as both a service consumer (it
consumes the actual services provided by dedicated service components or
systems) and a service provider (it exposes these virtualized services).
In the former case, it can decide which service to consume based on the
operational behavior of those services (routing scenario).
In the latter case, the services it exposes (or virtualizes) can themselves be
considered as managed resources and, consequently, subject to runtime
observation by the management infrastructure.
See Registry/Repository on page 15 for additional information about a service
registry and repository.
39
The purpose of this redbook is to focus on the IBM service registry and
repository product, WebSphere Service Registry and Repository. For more
detailed information about WSRR, see Part 2, WSRR concepts and
architecture on page 51.
40
41
customized version which isn't really being reused after all? SOA and services
make these governance issues even more important and thus, their
consequences even more significant.
Governance is more of a political problem than a technological or business one.
Technology focuses on matching interfaces and invocation protocols. Business
focuses on functionality for serving customers. Technology and business are
focused on requirements. While governance gets involved in those aspects, it
focuses more on ensuring that everyone is working together and that separate
efforts are not contradicting each other. Governance does not determine what
the results of decisions are, but what decisions must be made and who will make
them.
The two parties, the consumers and the providers, have to agree on how they're
going to work together. Much of this understanding can be captured in a
service-level agreement (SLA), measurable goals that a service provider agrees
to meet and that a service consumer agrees to live with. This agreement is like a
contract between the parties, and can, in fact, be a legal contract. At the very
least, the SLA articulates what the provider must do and what the consumer can
expect.
SOA governance is enacted by a center of excellence (COE), a board of
knowledgeable SOA practitioners who establish and supervise policies to help
ensure an enterprise's success with SOA. The COE establishes policies for
identification and development of services, establishment of SLAs, management
of registries, and other efforts that provide effective governance. COE members
then put those policies into practice, mentoring and assisting teams with
developing services and composite applications.
Once the governance COE works out the policies, technology can be used to
manage those policies. Technology doesn't define an SLA, but it can be used to
enforce and measure compliance. For example, technology can limit which
consumers can invoke a service and when they can do so. It can warn a
consumer that the service has been deprecated. It can measure the service's
availability and response time.
A good place for the technology to enforce governance policies is through a
combination of an enterprise service bus (ESB) and a service registry. A service
can be exposed so that only certain ESBs can invoke it. Then the ESB/registry
combination can control the consumers' access, monitor and meter usage,
measure SLA compliance, and so on. This way, the services focus on providing
the business functionality, and the ESB/registry focuses on aspects of
governance.
42
Service definition
The most fundamental aspect of SOA governance is overseeing the creation of
services. Services must be identified, their functionality described, their behavior
scoped, and their interfaces designed. The governance COE may not perform
these tasks, but it makes sure that the tasks are being performed. The COE
coordinates the teams that are creating and requiring services, to make sure
needs are being met and to avoid duplicate effort.
Often, it is not obvious what should be a service. The function should match a set
of repeatable business tasks. The service's boundaries should encapsulate a
reusable, context-free capability. The interface should expose what the service
does, but hide how the service is implemented and allow for the implementation
to change or for alternative implementations. When services are designed from
scratch, they can be designed to model the business; when they wrap existing
function, it can be more difficult to create and implement a good business
interface.
An interesting example of the potential difficulties in defining service boundaries
is where to set transactional boundaries. A service usually runs in its own
transaction, making sure that its functionality either works completely or is rolled
back entirely. However, a service coordinator may want to invoke multiple
services in a single transaction (ideally through a specified interaction like
WS-AtomicTransactions). This task requires the service interface to expose its
transaction support so that it can participate in the caller's transaction. But such
exposure requires trust in the caller and can be risky for the provider. For
example, the provider may lock resources to perform the service, but if the caller
never finishes the transaction (it fails to commit or roll back), the provider will
have difficulty cleanly releasing the resource locks. As this scenario shows, the
scope of a service and who has control is sometimes no easy decision.
43
The lifecycle of services becomes most evident when you consider the use of a
registry. When should a new service be added to the registry? Are all services in
a registry necessarily available and ready for use? Should a decommissioned
service be removed from the registry?
While there is no one-size-fits-all lifecycle that is appropriate for all services and
all organizations, a typical service development lifecycle has five main stages:
1. Plan
A new service that is identified and is being designed, but has not yet been
implemented or is still being implemented.
2. Test
Once implemented, a service must be tested. Some testing may need to be
performed in production systems, which use the service as though it were
active.
3. Active
This is the stage for a service available for use and what we typically think of
as a service. It is a service, it is available, it really runs and really works, and it
has not been decommissioned yet.
4. Deprecate
This stage describes a service which is still active, but will not be for much
longer. It is a warning for consumers to stop using the service.
5. Sunset
This is the final stage of a service, one that is no longer being provided.
Registries may want to keep a record of services that were once active, but
are no longer available. This stage is inevitable, and yet frequently is not
planned for by providers or consumers.
Sunsetting effectively turns the service version off, and the sunset date should be
planned and announced ahead of time. A service should be deprecated within a
suitable amount of time before it is sunsetted, to programmatically warn
consumers so that they can plan accordingly. The schedule for deprecation and
sunsetting should be specified in the SLA.
One stage which may appear to be missing from this list is maintenance.
Maintenance occurs while a service is in the active state; it can move the service
back into test to reconfirm proper functionality, although this can be a problem for
existing users depending on an active service provider.
Maintenance occurs in services much less than you might expect; maintenance
of a service often involves not changing the existing service, but producing a new
service version.
44
Service versioning
No sooner than a service is made available, the users of those services start
needing changes. Bugs need to be fixed, new functionality added, interfaces
redesigned, and unneeded functionality removed. The service reflects the
business, so as the business changes the service needs to change accordingly.
With existing users of the service, however, changes need to be made judiciously
so as not to disrupt their successful operation. At the same time, the needs of
existing users for stability cannot be allowed to impede the needs of users
desiring additional functionality.
Service versioning meets these contradictory goals. It enables users satisfied
with an existing service to continue using it unchanged, yet allows the service to
evolve to meet the needs of users with new requirements. The current service
interface and behavior is preserved as one version, while the newer service is
introduced as another version. Version compatibility can enable a consumer
expecting one version to invoke a different but compatible version.
While versioning helps solve these problems, it also introduces new ones, such
as the need to migrate.
Service migration
Even with service versioning, a consumer cannot depend on a service, or more
specifically, a desired version of that service, to be available and supported
forever. Eventually, the provider of a service is bound to stop providing it. Version
compatibility can help delay this day of reckoning but will not eliminate it.
Versioning does not obsolete the service development lifecycle, but it enables the
lifecycle to play out over successive generations.
When a consumer starts using a service, it is creating a dependency on that
service, a dependency that has to be managed. A management technique is for
planned, periodic migration to newer versions of the service. This approach also
enables the consumer to take advantage of additional features added to the
service.
However, even in enterprises with the best governance, service providers cannot
depend on consumer migration alone. For a variety of reasons, for example
existing code, manpower, budget, priorities, some consumers may not migrate in
a timely fashion. Does that mean the provider must support the service version
forever? Can the provider simply disable the service version one day after
everyone should have already migrated?
Neither of those extremes is desirable. A good compromise is a planned
deprecation and sunsetting schedule for every service version, as described in
Service deployment lifecycle on page 43.
45
Service registries
How do service providers make their services available and known? How do
service consumers locate the services they want to invoke? These are the
responsibilities of a service registry. It acts as a listing of the services available
and the addresses for invoking them.
The service registry also helps coordinate versions of a service. Consumers and
providers can specify which version they need or have, and the registry then
makes sure to only enumerate the providers of the version desired by the
consumer. The registry can manage version compatibility, tracking compatibility
between versions, and enumerating the providers of a consumer's desired
version or compatible versions. The registry can also support service states, like
test and deprecated, and only make services with these states available to
consumers that want them.
When a consumer starts using a service, a dependency on that service is
created. While each consumer clearly knows which services it depends on,
globally throughout an enterprise these dependencies can be difficult to detect,
much less manage. Not only can a registry list services and providers, but it can
also track dependencies between consumers and services. This tracking can
help answer the age-old question: Who's using this service? A registry aware of
dependencies can then notify consumers of changes in providers, such as when
a service becoming deprecated.
46
Service monitoring
If a service provider stops working, how will you know? Do you wait until the
applications that use those services stop working and the people that use them
start complaining?
A composite application, one that combines multiple services, is only as reliable
as the services it depends on. Since multiple composite applications can share a
service, a single service failure can affect many applications. SLAs must be
defined to describe the reliability and performance consumers can depend on.
Service providers must be monitored to ensure that they're meeting their defined
SLAs.
A related issue is problem determination. When a composite application stops
working, why is that? It may be that the application head, the UI that the users
interface with, has stopped running. But it can also be that the head is running
fine, but some of the services it uses, or some of the services that those services
use, are not running properly. Thus it is important to monitor not just how each
application is running, but also how each service (as a collection of providers)
and individual providers are also running. Correlation of events between services
in a single business transaction is critical.
Such monitoring can help detect and prevent problems before they occur. It can
detect load imbalances and outages, providing warning before they become
critical, and can even attempt to correct problems automatically. It can measure
usage over time to help predict services that are becoming more popular so that
they can run with increased capacity.
Service ownership
When multiple composite applications use a service, who is responsible for that
service? Is that person or organization responsible for all of them? One of them;
if so, which one? Do others think they own the service? Welcome to the
ambiguous world of service ownership.
Any shared resource is difficult to acquire and care for, whether it is a
neighborhood park, a reusable Java framework, or a service provider. Yet a
needed pooled resource provides value beyond any participant's cost: Think of a
public road system.
Often an enterprise organizes its staff reporting structure and finances around
business operations. To the extent that an SOA organizes the enterprise's IT
around those same operations, the department responsible for certain
operations can also be responsible for the development and run time of the IT for
those operations. That department owns those services. Yet the services and
composite applications in an SOA often do not follow an enterprise's strict
47
Service testing
The service deployment lifecycle includes the test stage, during which the team
confirms that a service works properly before activating it. If a service provider is
tested and shown to work correctly, does the consumer need to retest it as well?
Are all providers of a service tested with the same rigor? If a service changes,
does it need to be retested?
SOA increases the opportunity to test functionality in isolation and increases the
expectation that it works as intended. However, SOA also introduces the
opportunity to retest the same functionality repeatedly by each new consumer
who doesn't necessarily trust that the services it uses are consistently working
properly. Meanwhile, because composite applications share services, a single
buggy service can adversely affect a range of seemingly unrelated applications,
magnifying the consequences of those programming mistakes.
To leverage the reuse benefits of SOA, service consumers and providers need to
agree on an adequate level of testing of the providers and need to ensure that
the testing is performed as agreed. Then a service consumer need only test its
own functionality and its connections to the service, and can assume that the
service works as advertised.
Service security
Should anyone be allowed to invoke any service? Should a service with a range
of users enable all users to access all data? Does the data exchanged between
service consumers and providers need to be protected? Does a service need to
be as secure as the needs of its most paranoid users or as those of its most
lackadaisical users?
48
49
50
Part 2
Part
WSRR concepts
and architecture
51
52
Chapter 2.
53
54
The following sections give more detail on what WSRR is and what its functions
are in a service-oriented architecture, and just as importantly, what WSRR is not
intended for.
55
56
57
SOA governance tasks serve the entire SOA lifecycle, insuring service
cooperation, service technology compatibility, and proper service investment and
reuse.
WebSphere Service Registry and Repository plays a key role in the end-to-end
SOA governance. While the scope of SOA governance is definitively broader
than what WSRR provides support for, it is important to stress the fact that
WSRR must be considered as an enabler for SOA governance. WSRR supports
governance of service metadata throughout the lifecycle of a service from its
initial publication in the development space to deployment to service
management.
The support for SOA governance that WSRR provides is the subject of
Chapter 5, SOA governance enablers on page 157. The following is a brief
summary of the main mechanisms WSRR provides to support SOA governance:
WSRR is a registry/repository that allows customers to both store and register
standards-based service metadata including WSDL, XSD and policy. This
gives customers the ability to have a copy of record for all service metadata
and thus ensure consistency throughout their enterprise.
The publication of service metadata through tooling, UI or API allows
customers to socialize their high value or standardized shared services
encouraging interoperability and reuse.
The ability to query and find service metadata is used at development time
through tooling, for reuse of interfaces and schemas as well as static binding
of service endpoints. At runtime WSRR service queries through the API allow
infrastructures such as the ESB to make dynamic endpoint selection
decisions based on metadata in the registry.
The capture of service dependencies allows the impact of changes to be
assessed. Consumers of services that are impacted by the change can be
notified and thus take advantage of improvements and ensure that no
degradation in quality of service occurs.
WSRR provides a basic mechanism for associating policies to services which
allows the infrastructure (for example, ESB, Tivoli) or application code to
interpret and enforce the policy. This gives agility since policy is configured in
the registry which can be changed quickly (without redeployment) but is still
subject to governance.
WSRR allows client applications (and other middleware) to extend the
metadata that can be represented beyond the out-of-the-box
standards-based metadata. By providing user defined classifications,
properties and relationships, WSRR can be extended to support any
enterprise service metadata model.
58
59
For a further detail, see 1.1.5, Supporting elements of the SOA reference
architecture on page 14 and 1.2.7, Enterprise Service Bus and SOA on
page 28.
60
WebSphere
Integration
Developer
WebSphere
Service
Registry and
Repository
Info
Services
Director
WebSphere
Business
Modeler
Rational
Application
Developer
Figure 2-1 WSRR and service oriented information and metadata exchange in the SOA
lifecycle
61
62
63
Clense
Info Svc 1:
ValidateAddress
Transform
Info Svc 2:
OrderHistory
Standardize, merge,
and correct
information
Combine and
restructure information
for new uses
Transform
Info Svc 3:
AccountInfo
Publish
Information
Service
Combine and
restructure information
for new uses
Publish
Enrich
Find
Manage
Govern
WebSphere
Integration
Analyzer
WebSphere
Integration
Developer
3rd
Party...
WebSphere
QualityStage
Sharing of
Service Metadata
WebSphere
Metadata
Server
WebSphere
Service
Registry and
Repository
Info
Services
Director
RDA
Info
Services
Director
WebSphere
DataStage
WebSphere
Business
Modeler
Rational
Application
Developer
Clense
Info Svc 1:
ValidateAddress
Transform
Info Svc 2:
OrderHistory
Standardize, merge,
and correct
information
Combine and
restructure information
for new uses
Transform
Info Svc 3:
AccountInfo
Combine and
restructure information
for new uses
Discovery of Services
and metadata
64
65
the service artefacts. This severely limits its ability to control and govern their
change.
Note: For more information about UDDI, refer to:
http://www.uddi.org/
66
User
User
Interface
Interface
Web
Eclipse
Plug-in
External
Systems
ESBs
Process
Servers
Appliances
Monitors
3rd
Party
Registries &
Repositories
Events
Generated
Programming
Programming
Interfaces
Interfaces
Content models
RDB
Extensions
Extensions &
&
Integrations
Integrations
SOAP
Java
Registry
Registry &
& Repository
Repository
Admin
Admin
Governance
Governance
Create
Create
Retrieve
Retrieve
Update
Update
Delete
Delete
Query
Query
JMX
Import
Import // Export
Export
Configure
Configure
Transition
Transition
Validate
Validate
Notify
Notify
Impact
Impact Analysis
Analysis
Audit
Audit
Validation
Access Control
Lifecycle
Notification
Classifications
Validators
Events
Generated
67
68
Governance functions
WebSphere Service Registry and Repository supports a rich set of extensible
governance functions, including the ability to model your own service lifecycle
model for governed entities, define valid transitions between service states, write
and plugin validators to guard the transitions between states, and designate
(notification) actions to be taken as result of the transition. It also provides
interfaces to analyze the impact of changes to WSRR content, and provides
auditing of such changes.
Classifications
Classifications play a major role in many interactions with WebSphere Service
Registry and Repository. They allow you to annotate service descriptions and
parts of service definitions with your corporate vocabulary and extend the service
information model with additional information which are relevant to your particular
context. For example, you can use classifications to segregate service endpoints
that are deployed in different environments. Classifications are also used by
WSRR to capture the governance state. WebSphere Service Registry and
Repository classification systems are captured as ontologies in Web Ontology
Language (OWL) documents that you load into WSRR using the administrative
interface. You can then classify managed entities with values from these
classification systems, which allows you to perform classification-based queries,
and restrict access based on classification.
69
70
Administration interfaces
These interfaces support the import and export of WSRR content for exchange
with other repositories and provide a JMX-based API for configuration and basic
administration. These support interactions with the Access Control model and
with the Classification Systems.
Programming interfaces
You can use Java and SOAP APIs to interact programmatically with WSRR.
These APIs provide basic CRUD (create. retrieve, update, and delete)
operations, governance operations, and a flexible query capability based on
XPath. You can use the SOAP API to communicate content using XML data
structures or the Java API to communicate content using SDO data graphs.
User interfaces
Two user interfaces are provided that enable you to interact with WebSphere
Service Registry and Repository.
A servlet-based Web User Interface (UI) is the main way for your users,
representing different roles, to interact with WSRR. This UI supports look-up and
publish scenarios, metadata management and analysis scenarios, and functions
that support SOA governance.
Your developer roles can also work with WSRR using an Eclipse plug-in that
supports look-up, retrieval, and publishing of service metadata from your
Eclipse-based development tools or management consoles.
71
Service description entities are artefacts and documents created and managed
in WSRR, both physical and logical, and describe the service. For example
WSDL, PortType.
Service description metadata is used to decorate service description entities with
attributes like Properties and Relationships with other elements.
Figure 3-1 on page 80 depicts an overview of WSRRs content model. See
Chapter 3, Information model on page 79 for more information.
Query interface
You can interact with the WebSphere Service Registry and Repository query
interface in two ways:
You can use one of the predefined queries that are configured via parameters
(for example, all WSDL documents with classifier X).
You can write your own XPath-based query.
You can use XPath expressions in the Query API to perform searches for coarse
and fine-grained queries. Queries can be performed using semantic annotations,
properties, and all or parts of the physical service metadata artefacts. You can
request that fragments of metadata be returned (such as endpoints), all
metadata be returned, and both metadata and documents be returned. In
addition to free-form XPath-based queries, a set of pre-canned queries are
available for you to use to address common paths through the WSRR information
model.
When you use the XPath-based query interface, you create an XPath expression
that identifies the type of managed entity to be returned and a filter that captures
the managed elements related to the desired object. Extensions are provided for
you to include classification annotations in a query. For example, if you are
looking for all WSDL Services that have a port that refers to a binding referring to
72
User interfaces
Two user interfaces (refer to Figure 2-3 on page 67) are provided to access
WSRR:
A Web user interface
An Eclipse plug-in
Eclipse plug-in
A subset of this user interface is offered as an Eclipse plug-in to meet the needs
of your developer and analyst users that use Eclipse based-tooling. The Eclipse
plug-in is used primarily for lookup, browse, retrieve and publish capabilities.
See Chapter 11, Using the WSRR Eclipse plug-in on page 415 for additional
information.
The Eclipse plug-in is not shipped with the WebSphere Service Registry and
Repository product distribution. It is available as a download from the following
URL:
http://www.ibm.com/support/docview.wss?rs=3163&context=SSWLGF&dc=D40
0&uid=swg24013925&loc=en_US&cs=UTF-8&lang=en
73
Supported APIs
End-users can interact directly with WSRR using a Web-based console
application or an Eclipse-based plug-in as mentioned previously. In addition,
applications can fully interact with WSRR using one or more of its application
programming interfaces (APIs) as shown in Figure 2-3 on page 67 and below:
A J2EE-based Java API (EJB)
A Web service SOAP-based API
An administration JMX-based API
Usage APIs
Note: We refer to both the EJB API and the SOAP API as usage APIs to
emphasize the fact that these APIs directly support WSRR regular use cases,
as opposed to administration operations which are performed via the JMX
API.
WebSphere Service Registry and Repository provides three different usage APIs
with dedicated scope and exposition as summarized in Table 2-1.
Table 2-1 WebSphere Service Registry and Repository usage APIs
74
API
Scope
Exposed
as EJB
Exposed as SOAP
Web service
Core
Yes
Yes
Ontology
Yes
Yes
Governance
Yes
No
Both the EJB and SOAP APIs support publishing (creating and updating)
service metadata artefacts and metadata associated with those artefacts,
retrieving service metadata artefacts, deleting the artefacts and their
metadata, and querying the content of WSRR through the Core API.
Read-only manipulation of ontologies and classification systems is provided
to EJB and SOAP clients through the Ontology API. Modification of ontology
and classification systems must be performed using the Web interface.
Governance operations are restricted to J2EE clients as the governance API
is exposed only as an EJB at the time of writing.
The EJB programming API uses Version 2 of Service Data Objects (SDO) to
capture the data graphs inherent in the information model, allowing access to
physical documents, logical parts of the physical documents, and
GenericObjects.
The SOAP API uses XML documents to similarly represent Service Data Objects
to communicate content structures in both the physical and logical model.
See 4.1, Java API (EJB) on page 120 and 4.2.3, SOAP API on page 139 for
additional information.
The governance API lets you analyze the impact of changes to specific artefacts.
A set of predefined impact queries is available to help you navigate through the
WSRR content according to popular patterns, such as which WSDL files import
or use a specific XSD.
Administration API
WebSphere Service Registry and Repository also provides a JMX-based
Administration API that supports basic configuration and loading and managing
of metadata in support of repository content, such as classification and lifecycle
management.
The Administration API allows you to load definitions of state machines to be
used to model the lifecycle of governed entities, and to load classification
systems described in OWL.
In addition, the Administration API supports registration of plugins for Validation
functions or additional Notification providers.
See 4.5, Admin (JMX) on page 155 for additional information.
75
Service lifecycle
WebSphere Service Registry and Repository provides support for the definition
and the enforcement of a lifecycle which is applied to each governed entity.
For each governed entity a state machine is defined that describes the lifecycle
states the entity can take on, the transitions between those states, conditions for
the transitions to be taken and actions to be taken should a transition be
performed. While WSRR provides a set of out-of-the-box lifecycle models, you
can define your own state machines to match with your requirements.
Validation
WSRR allows you to register validation functions that are run when basic CRUD
operations are executed against its content, and also in the context of the
governance model when lifecycle state transitions are operated on governed
objects. Validation functions must not have side-effects and must return a
Boolean result that can be used to veto the update.
An example of validation scenarios could include WS-I compliance checking for
services managed in WSRR.
Notification
WebSphere Service Registry and Repository provides basic event notification
features to allow exploiters to register their interest in any changes to WSRR
content. Initially notification will be based on JMS publication of events. These
events identify the type of the change and contain a pointer to the object that was
changed.
WSRR ships a default notification handler that publishes change events on a
JMS topic. The event specifies the type of event (create, update, delete or
transform), the artefact impacted (identified via its URI) and a few more bits of
information about the artefact. To avoid violating access control rules, the actual
76
content of the artefact in question is not shipped with the event and must be
retrieved separately.
Examples of notification scenarios could include an e-mail notification feature
that allows users to request an e-mail to be sent when an interesting event
happens such as the publication or the revocation of services in the overall
lifecycle.
Auditing
A simple Audit capability is provided that logs information about WSRR updates.
See Chapter 5, SOA governance enablers on page 157 for additional
information.
77
78
Chapter 3.
Information model
This chapter describes the information (metadata) model used in WebSphere
Service Registry and Repository (WSRR). It explains different types of service
metadata stored in WSRR.
Other documentation may refer to the WSRR information model as a content
model. In this redbook, we use the term information model.
The topics covered are:
3.2, Service description entities on page 80
3.3, Service description metadata on page 84
3.4, Templates on page 88
3.5, Document types on page 89
3.6, XPath on page 99
3.7, Service Data Objects (SDO) on page 99
3.8, BaseObject on page 101
3.9, Query on page 103
79
3.1 Introduction
The WebSphere Service Registry and Repository information model has
elements representing service description entities (such as WSDL) and service
description metadata (such as Classifications). All WSRR elements have a
WSRR-assigned URI, a name and a description.
Service description entities are artefacts and documents created and managed
in WSRR, both physical and logical, and describe the service. For example
WSDL, PortType.
Service description metadata is used to decorate service description entities with
attributes like Properties and Relationships with other elements.
Figure 3-1 is an overview of the different types of metadata stored in WSRR.
Service Description Entities
Physical Documents
Properties
WSDL
XSD
SCDL
WS-Policy
XML User-defined Documents
..
name
namespace
version
description
modifiedDate
imports
includes
predecessor
User-defined
name
namespace
User-defined
metrics
derivedFrom
operations
messages
User-defined
Relationships
Logical derivations
Interface
Operation
Message
Type
Service
Binding
Endpoint
..
Metadata
applies to
all
entities
GenericObjects
User-defined by classification
Business Application
Business Process
Governed Collection
External reference
User-defined
owner
externalURL
User-defined
dependantServices
serviceInterface
governedEntities
policies
..
Classifications
User-defined
States
Created
Approved
Published
Operational
User-defined
Environments
Development
Test
Approval
Production
User-defined
GenericObjects
Application
Process
Capability
Standard Ontologies
NAICS
UNSPSC
ISO3166
80
Physical documents are XML documents that are known as service metadata
artefacts.
2. Logical derivations
Logical derivations are the finer-grained pieces of content that result when
some types of physical documents are parsed as they are loaded into WSRR.
3. GenericObject
GenericObjects are generic entities that are usually typed, and represent
anything that is not represented by a document in WSRR.
You can interact with all three types of service description entities, using them in
queries, applying service annotations, and establishing relationships from and to
them.
For details on these document types, see 3.5, Document types on page 89.
For these document types WSRR provides special services, including parsing of
the documents upon receipt into Logical Derivations. See 3.2.2, Logical
derivations on page 82.
Other types of service metadata can be stored using a generic content type:
XML Document; documents of type XMLDocument are not decomposed into the
logical derivations.
81
82
3.2.3 GenericObject
There is one other kind of entity in WSRR, referred to as a GenericObject. This is
a generic object that can be used to represent anything that does not have a
physical document in WSRR.
GenericObjects can be used to represent a reference to content in some other
metadata repository such as a portlet in a portlet catalogue, an asset in an asset
repository, service implementation artefacts kept in a source code library or
information about SOA infrastructure topologies in a configuration management
database.
Note: GenericObject is the API name for the objects that appear in the Web UI
as Concepts. Refer to 9.9, Concepts on page 370 for more information.
A GenericObject can be used to group physical artefacts together for ease of
retrieval. GenericObjects can be used to represent collections of documents or
other GenericObjects. GenericObjects can also be used to represent a
business-level view on the SOA metadata managed in WSRR; this could include
GenericObjects such as Business Process, Business Service, Business Object
and Business Policy.
A GenericObject is simply a container for metadata, there are no constraints as
to what it can be used to represent. This means that you must provide additional
metadata such as classifications or templates to distinguish between different
types of GenericObject and thus the properties and relationships that are
appropriate. It is up to client applications to enforce the interpretation of these
types. WSRR provides support through templates and validator plug-ins to
allow you to extend WSRR to perform this.
GenericObjects provide the following predefined properties:
Name
Namespace
Version
Description
GenericObjects can be created, modified, used and deleted using the Web UI
(see 9.9, Concepts on page 370) or the API (see Chapter 4, Interfaces and
APIs on page 119).
83
3.3.1 Properties
Properties are simple name/value pairs that are associated with any of the
Service description entities.
Some properties are assigned by the system, such as the unique id, the owner,
and the last time the service entity was changed. These system-assigned
properties cannot be changed.
Others are derived through the parsing of a key-type service description
document into its logical model. Properties of this type include name and
namespace.
Sometimes you are allowed to change these system-assigned values. You can
also create your own properties. These are referred to as user-defined
84
3.3.2 Relationships
In a SOA environment, organizations expect to see reuse and loose flexible
coupling between services. This means that it is essential to able to determine
what services depend on what other services (or other service artefacts) at any
time in the lifecycle of the business applications.
Even at the IT level, services are described using standards-based documents
such as WSDLs and XSDs which have dependencies between them. As
business services progress through their lifecycles and evolve to meet market
needs, the targets of these dependencies will change and it will be crucial to
keep this information up to date.
Any changes to services in the deployed environment may have an impact on
other business applications. Changes in interface versions and compatibility will
need to be tracked and the impact of any change evaluated.
WebSphere Service Registry and Repository (WSRR) provides a means of
defining these relationships and dependencies between objects as relationship
metadata. WSRR defines and associates a number of built-in relationships that
are defined against the classes of objects exposed in the WSRR information
model. These are primarily associated with documents and imports and includes
between them. These built-in relationships are often created automatically when
a document is published and will therefore never be modifiable by a user.
Relationships tie together one source service description entity to one or more
target service description entities. Every relationship is given a name. A source is
only allowed to have a single relationship with a given name.
Some relationships are assigned by WSRR during the parsing of key types of
documents. One example of a system-assigned relationship is the relationship
85
established between XSD documents based on the importing of one into the
other.
WSRR also allows custom relationships. For example, you can:
Relate a GenericObject that represents an external object to a service using a
user defined relationship.
Relate all of the service description documents that will be governed as a unit
to a governable entity.
Relate a monitoring policy to a service endpoint.
These can be added or deleted from any object on an instance by instance basis.
For custom relationships both the name and target objects can be defined by the
user.
WSRR treats built-in relationships and custom relationships in similar ways for
the purposes of manipulation and query.
Relationships can be created, modified, used and deleted using the Web UI (see
9.5, Relationships on page 347) or the API (see Chapter 4, Interfaces and
APIs on page 119).
3.3.3 Classifications
WebSphere Service Registry and Repository (WSRR) provides a means of
classifying service artefact descriptions represented in WSRR. This allows you to
organize your services by allocating classifications from a set of predefined
classification systems.
Each classification system represents a different way of organizing services and
is represented as a hierarchy of classifications similar to a library indexing
system. WSRR supports any number of classification systems that can be
predefined to organize your service artefacts in the best way.
You can load classification systems into WSRR where they can then be used to
apply semantic meaning to Service description entities. Classification systems
are documents encoded using the Web Ontology Language (OWL).
While any valid OWL document can be used as a Classifier system, at present
WSRR exploits only a small subset of the expressiveness of OWL. WSRR
represents OWL Classes as classifiers and interprets the subTypeOf relationship
between those Classes as establishing a classifier hierarchy. Other OWL
concepts such as data or relationships representing properties or other built-in
OWL relationships are ignored.
86
Ontologies
An ontology is a vocabulary used to describe some domain. This includes
describing the entities in the domain, and their relationships. See the definition of
an ontology following Classifications on page 69.
Taxonomies
At a more simplistic level, OWL can also describe taxonomies. A taxonomy is a
system of hierarchical types which can be used to describe entities. The types
are expressed in a class and subclass system.
So for example, a simple taxonomy could consist of a class called Transport
which could have subclasses Air Transport and Land Transport. Then, Land
Transport could in turn have subclasses Bus and Car. This hierarchy means
that a Car is a type of Land Transport, and is also a type of Transport.
87
Classification classes are used to organize and find artefacts in WSRR. Any
artefact may be tagged or classified with multiple classification classes.
For example an organizational classification system may be produced, with a
class Europe, which has a subclass UK, which in turn has a subclass London
office (and there could be many other classes for other regions, countries and
groups).
In addition simple lifecycle classification system could be produced with classes
such as Development, Production, Obsolete and so on.
An artefact in WSRR could then be classified with any number or combination of
these classes. Although the English language meaning of some of these classes
suggests that some of them are mutually exclusive, there is no enforcement of
such semantics; all classes are equal and any can be applied to any artefact.
One possibility is that a WSDL portType, say, is classified with the London office
and Production classes. This artefact would then be returned in a search for all
artefacts that had both these classifications applied, that is a search for all
artefacts produced by the London office that were in the production state. It
would also be returned for a search for all artefacts produced in the UK that were
in production.
Classifications can be used from the Web UI (see 9.6, Classifying objects on
page 358) or the API (see Chapter 4, Interfaces and APIs on page 119).
3.4 Templates
As discussed previously, user-defined properties and relationships can be used
to customize the set of predefined properties and relationships provided in the
WSRR meta-model. Users can add properties to a WSDLDocument or they can
configure a GenericObject with properties and relationships to represent its
structure.
To simplify the process of customizing WSRR entities, a simple template
mechanism is provided. It allows you to create an XML schema that captures the
definition of properties and relationships associated with a GenericObject entity
of a particular type. You can then associate the template with the entity type. All
interactions with entities of that type will then be patterned to match the
template, designating the properties and relationships that are relevant when
interacting with that kind of entity.
Template allows user-defined properties and relationship names to be applied
consistently to GenericObjects created within WSRR. These templates are
88
defined as simple XSD complex types with attributes being used to represent the
property and relationship names expected for entities created from the
templates.
Templates may therefore be used to represent metadata that describes objects in
the business domain, such as business services. Templates can be used to
model sets of metadata, which may then be applied to any GenericObjects that
are created in WSRR, thus allowing many different metadata models to be
represented.
Note: WSRR provides no other metadata modelling tools, so the use of
templates is the only way to achieve this. The template model does not include
type-checking or any other modelling-based validation, so you should ensure
that the templates are correct when you create them.
For more details on configuration of Templates, see 9.9.1, Defining a concept
template on page 371.
The menu hierarchy for service documents can be seen in Figure 3-2 on
page 90.
89
For these document types, WSRR provides special services, including parsing of
the documents upon receipt into logical derivations or a set of logical objects.
90
91
92
of content), any derived objects will be deleted and the attached metadata will be
lost.
In addition to this parsing of XSD documents, WSRR automatically detects and
maintains dependencies between documents. At the time of loading or creation,
of the dependent document, the documents that it depends on must be:
Already available within WSRR. Special handling of this is required since
xsd:include, xsd:import, xsd:redefine statements do not include enough
information to resolve between different versions of the same schema (same
name, location and namespace).
Provided with the dependent document as part of the load. In this case the
document that is depended on will also be loaded and parsed.
Available from the uri given in the import or include location hint. In this case
the document that is depended on will also be loaded and parsed.
For each of these dependencies encountered and resolved, WSRR will ensure
that a built-in relationship is established between the dependent document and
the depended on document.
See Figure 3-5 for XSD logical objects.
93
94
Bindings - These identify the bindings defined in the document including the
soap binding and the portType supported.
Services - These identify the service, ports, soap address and the bindings to
which they relate.
Each of these constructs results in a related collection of objects that are stored
in the registry and related to the WSDL document that defined them. These
derived or logical objects cannot be created or deleted by the user, they are
managed entirely by the loading or deleting of the WSDL document that defines
them. This has the implication that if any document is deleted or updated (in
terms of content), any derived objects will be deleted and the attached metadata
will be lost.
The objective for all these derived objects is to allow the named construct to be
annotated with metadata to indicate how it should be used across the SOA
enterprise. This allows a particular construct declared within a document to be
managed differently from other constructs declared within the same document.
For example, different policies might be attached to different operations of a
service interface even though all the operations are defined in the same WSDL
document.
See Figure 3-6 for WSDL logical objects.
95
96
SCA module file - this provides the definition of the module in terms of the
internal components used within the module. WSRR does not interpret the
internal content information but does identify any externalized dependencies
as imports and exports.
SCA imports - these provide the definitions of the external services that the
module depends on. These import files define the interfaces, bindings and
endpoints that the module will need to resolve when it is deployed.
SCA exports - these provide the endpoint descriptions that the module
exposes in terms of interfaces, bindings and endpoints.
For more details on SCA import export bindings, see 14.3.2, Mediation
modules on page 516.
One of the advantages of SCA over WSDL is that it allows a wider range of
bindings to be expressed. Thus, SCA modules can work with JMS and other
message based paradigms as well as the Web services that WSDL supports.
See Figure 3-7 for SCA logical objects.
97
98
3.6 XPath
The XML Path Language (XPath) is a set of syntax and semantics for referring to
portions of XML documents.
XPath models an XML document as a tree of nodes, and provides the ability to
navigate around the tree, selecting nodes by a variety of criteria.There are
different types of nodes, including element nodes, attribute nodes and text
nodes. Some types of nodes also have names.
XPath uses expressions to identify a set of nodes in an XML document. This set
of nodes can contain zero or more nodes.
XPath expressions can refer to attributes as well as elements in an XML
document. When referring to an attribute, the @ character is used. For example,
the following XPath expression identifies currentPrice elements whose currency
attributes contain the value EUR:
/list/item/currentPrice[@currency="EUR"]
XPath includes built-in functions for string values, numeric values, date and time
comparison, node and QName manipulation, sequence manipulation, Boolean
values, and more.
XPath is intended to be used by other specifications such as Extensible
Stylesheet Language Transformations (XSLT) and the XML Pointer Language
(XPointer).
For more details on XPath, visit the following Web sites:
http://www.w3.org/TR/xpath
http://www.ibm.com/developerworks/edu/x-dw-xxpath-i.html
99
100
3.8 BaseObject
BaseObject is the root WSRR type. All elements in WSRR are inherited from
BaseObject. It defines common attributes and relationships.
Example 3-1 BaseObject
101
102
3.9 Query
Once registered, services must be available for reuse and management for them
to be any use. WSRR implements a subset of XPath 2.0 with some extensions to
provide a simple yet powerful search and query mechanism.
103
WSRR allows querying against a virtual XML document rooted at /WSRR. This
document contains every SDO object held in WSRR.
The child elements of the /WSRR root are named after top-level SDO types, each
element instance representing an object.
A simple example of a query expression is:
/<PathExpression>[<FilterExpression>]
Where, <PathExpression> is the path to the required SDO along the containment
hierarchy of the information model. For example to search for WSDLDocument
SDOs the <PathExpression> is /WSRR/WSDLDocument, for WSDLPort SDOs the
<PathExpression> is /WSRR/WSDLService/ports.
Elements of types which are not top-level are named after the containing relation.
For example, /WSRR/WSDLService/ports. SDO attributes are modelled as XML
attributes on those elements.
For clarity, the word 'association' is used to mean 'non-containment relationship'.
A 'relationship' can be through association or containment.
An element is said to be contained by another if it is accessed at a lower point in
the XML hierarchy. An element is said to be associated to another if the former is
related to the latter but the latter is not contained by the former. That is,
association is used in a more specific sense than in UML, to mean
non-containment relationships in particular.
bsrURI attribute
A bsrURI attribute of XSD type xs:ID is assigned to every SDO object which is
unique to it within WSRR. These bsrURIs are used to implement associations
internally and so can be safely used to reconstruct relationships between objects
obtained by one or more queries. This is safer than using the original ids
because bsrURIs are WSRR-unique, rather than document-unique.
Do not use bsrURIs directly to navigate associations. For each association a
function has been provided which takes the current context as its only argument.
This function replaces the current context node with that of the associated
element.
104
PropertyQuery
A PropertyQuery is used when only some attributes of objects that match the
query expression are to be returned. In this case, the result of the query is a
collection of QueryResult objects, each of which has the appropriate
user-defined properties set to the values of the chosen attributes of a matching
object.
GraphQuery
A GraphQuery is used when a complete datagraph is to be returned for each
object that matches the query expression. The default is to return all the objects
related to the matched object, but an attribute on the GraphQuery can control the
depth of the returned graph. A depth parameter can be specified on the
GraphQuery object that allows you to specify the depth of relationships that are
resolved in the object graph that is returned.
Specifying a depth parameter of -1 means that a complete object graph is
returned. For example, if a query with depth parameter of -1 returns a single
WSDLService element, you can then programmatically follow all the relationships
(both predefined and user-defined) from the root WSDLService object that is
returned from the query.
Specifying a depth parameter of 0 implies that only the objects that have been
queried for are returned and so you can access all the properties for a given
object, but cannot access any related object programmatically without executing
an additional query.
For example, if a WSDLService is returned, the default behavior will be to return
the WSDLService instance itself, all of the WSDLPort objects contained by the
WSDLService, the WSDLBindings associated with each WSDLPort and so on. If the
depth attribute were set to 2, then only the WSDLService, the WSDLPort objects
and the WSDLBinding objects would be returned.
The leaf objects have empty values for modelled relationships and do not have
any user-defined relationships.
Simple queries
This section explains how to write basic XPath queries.
105
Queries are built up from expressions separated by forward slashes '/'. Here is a
graph query which returns all WSDLServices:
/WSRR/WSDLService
Note that the singular form is used. The Relationship map (See Relationship
map on page 111) in the has the correct forms of all relations. Adding further
expressions delves deeper, finding objects which are either contained by or
associated with the preceding elements. For example, this graph query will return
all WSDLPorts contained by any WSDLService.
/WSRR/WSDLService/ports
To traverse an association rather than a containment relationship, append '(.)'. All
user-defined relationships are considered associations.
/WSRR/WSDLBinding/portType(.)
To retrieve an attribute (built-in or user-defined) from an element, use '@' in a
property query:
/WSRR/WSDLService/@name
It will return the names of all the WSDLServices which exist, not the
WSDLService objects themselves. If instead the intention was to find all
WSDLServices called 'TickerService', the following graph query could be used:
/WSRR/WSDLService[@name='TickerService']
Note: Graph queries end (ignoring predicates) in a relationship name, like
WSDLService or binding(.). Property queries end in an attribute name, like
@name. Use the appropriate API code for each.
Predicates
This section explains how to filter your results.
The previous example showed the use of a simple predicate to filter the objects
returned. Predicates can be used at any stage, and more than once in the query.
/WSRR/WSDLService[@name='Catalogue']/ports[@name='search']
Predicates can be logically combined using 'and' and 'or'. The 'or' operator has a
higher precedence in XPath than it does in SQL, so using parentheses to group
complex expressions is recommended to avoid unexpected results.
/WSRR/WSDLService[@name='TickerService' and @version!='1.2']/ports
/WSRR/WSDLService[@name='Catalogue' or @name='Library']
106
Predicates can be more complex than just an attribute accessor. They can be
any valid XPath expression which evaluates to a Boolean. Query 1 below returns
WSDLService objects, whereas query 2 returns WSDLPorts:
1. /WSRR/WSDLService[ports/@name='incoming']
2. /WSRR/WSDLService/ports[@name='incoming']
By putting the two together, complex filters can be created like this:
/WSRR/WSDLService[ports/@name='incoming' and ports/@name='outgoing']
The above query demonstrates that different objects may be used to fulfil each
sub-expression of the predicate. It could be translated as give me all the
WSDLServices which have a port named 'incoming' and also have a port named
'outgoing'.
To express give me all the WSDLServices which have a port named 'incoming'
that is also described as 'open', use nested predicates. This forces a single port
to match both conditions:
/WSRR/WSDLService[ports[@name='incoming' and @description='open']]
The matches() function allows you to use '.*' within your queries to mean 'any
sequence of characters'. For example, these queries find WSDLServices whose
names contain IBM at the beginning, end and in the middle respectively. No other
elements of regular expressions syntax are allowed.
/WSRR/WSDLService[matches(@name, 'IBM.*')]
/WSRR/WSDLService[matches(@name, '.*IBM')]
/WSRR/WSDLService[matches(@name, '.*IBM.*')]
The existence of a user-defined property or relationship can be queried like so:
/WSRR/WSDLService[@MyProperty]
/WSRR/WSDLService[MyRelationship(.)]
Note: Comparisons can be made, but all values are treated as strings. This
means that '2' is considered to be greater than '10'. Avoid queries like this:
# DO NOT DO THIS!
/WSRR/WSDLService[@version > '10']
107
A star can also be used to mean any attribute. This will include both built-in and
user-defined attributes.
/WSRR/WSDLService[@*='StockQuote']
These are the only supported uses of the double-slash and star operators.
The WSRR-provided function, anyUserDefinedRelationship(.), acts like a star for
user-defined relationships. This function can be used within a predicate as well,
to find objects which have user-defined relationships:
/WSRR/WSDLService/anyUserDefinedRelationship(.)
/WSRR/WSDLService[anyUserDefinedRelationship(.)]
Classification functions
WSRR provides a number of additional XPath functions to assist querying using
classifications. Some of the important functions are
classifiedByAnyOf, which returns true if an object is classified with any of the
URIs specified as arguments to the function.
classifiedByAllOf, which returns true if an object is classified by all of the
URIs specified as arguments to the function.
Note that these functions all take a single dot '.' as their first argument. The
examples use the following ontology (words are used instead of proper URIs for
clarity):
class color
class red
class green
class shape
class round
class tall
This ontology is used to classify the following WSDLServices:
1. name="Apple" classifications=["red", "round"]
2. name="Lime" classifications=["green", "round"]
3. name="Tree" classifications=["green", "tall"]
The following function:
classifiedByAnyOf(., 'owlURI1', 'owlURI2', ...)
108
It returns all objects classified by at least one of the given owlURIs or their
subtypes. So in our example, query:
/WSRR/WSDLService/classifiedByAnyOf(., 'shape')
It will return all three WSDLServices. The following query:
/WSRR/WSDLService/classifiedByAnyOf(., 'red', 'round')
It will return the Apple and Lime WSDLServices. The following query:
/WSRR/WSDLService/classifiedByAnyOf(., 'green', 'tall')
It will return the Lime and Tree WSDLServices.
The following function:
classifiedByAllOf(., 'owlURI1', 'owlURI2', ...)
It returns all objects classified by all of the given owlURIs or their subtypes. So in
our example, the following query:
/WSRR/WSDLService/classifiedByAllOf(., 'shape')
It will return all three WSDLServices. The following query:
/WSRR/WSDLService/classifiedByAllOf(., 'red', 'round')
It will return the Apple WSDLService. The following query:
/WSRR/WSDLService/classifiedByAllOf(., 'green', 'tall')
It will return the Tree WSDLService.
Following function:
exactlyClassifiedByAnyOf(., 'owlURI1', 'owlURI2', ...)
It returns all objects classified by at least one of the given owlURIs. Subtypes are
not considered. So in our example, the following query:
/WSRR/WSDLService/exactlyClassifiedByAnyOf(., 'shape')
It will return none of the WSDLServices. The following query:
/WSRR/WSDLService/exactlyClassifiedByAnyOf(., 'red', 'round')
It will return the Apple and Lime WSDLService. The following query:
/WSRR/WSDLService/exactlyClassifiedByAnyOf(., 'green', 'shape')
It will return the Lime and Tree WSDLServices.
109
Treat as
There are two points in the model where the query system needs some help to
know what the type of the elements are. Consider this query:
/WSRR/Module/exports
You know that for the Module you are interested in, the exports are
SCAWSDLPortTypes. As far as the query engine is concerned though, they are of
the supertype LogicalObject. To access properties or relationships defined on
the subtype, you must introduce a downcast, expressed in XPath with 'treat as':
/WSRR/Module/exports/(interfaces treat as
element(interfaces,SCAWSDLPortType))/WSDLPortType(.)
/WSRR/Module/exports/(interfaces treat as
element(interfaces,SCAWSDLPortType))[WSDLPortType(.)[@name='pt']]
/WSRR/Module/exports/(exportBinding treat as
element(exportBinding,SCAExportBinding))[@name='eb' and
@namespace='ens']
Note: The parentheses around the treat as expression are required.
The following types all descend from concrete supertypes and must be cast
using 'treat as' to access the relations and properties they define:
JMSImportBinding
JMSExportBinding
SCAImportBinding
110
SCAExportBinding
SLSBImportBinding
WebServiceImportBinding
WebServiceExportBinding
SimpleTypeDefinition
ComplexTypeDefinition
SCAWSDLPortType
Relationship map
This relationship map describes the WSRR object hierarchy and can be used to
assist in building XPath queries.
The map employs the following conventions:
Relations are given as their simple names.
Attributes are prefixed with @.
Containment is represented with indentation.
X < Y means type X inherits from Y.
X
Concrete types
Concrete types are those WSRR types which are directly accessible from an
XPath query. Use this map to begin building an XPath query.
To build an XPath query, begin at /WSRR and traverse through the object
hierarchy, appending subtypes, separated by /, at each stage and incorporating
attributes as required. Where a type A inherits from a type B (indicated by < or
111
Action
XPath query
/WSRR
/WSRR/Subscription
/WSRR/Subscription[@owner="Admin
User"]
/WSRR
/AttributeDeclaration < LogicalObject
/ComplexTypeDefinition < XSDType
/localAttributes is a LocalAttribute
@attributeType
/Document < OriginalObject
@content
@encoding
@location
/ElementDeclaration < LogicalObject
/ExportDocument < Document
/GenericObject < OriginalObject
/GraphQuery < QueryObject
@depth
/ImportDocument < Document
/Module < LogicalObject
@moduleType
/exports is an Export
/exportBinding is an ExportBinding
112
/interfaces is an Interface
@preferredInteraction
/imports is an Import
/importBinding is an ImportBinding
/interfaces is an Interface
@preferredInteraction
/ModuleDocument < Document
@moduleType
/PolicyDocument < Document
/PolicyExpression < LogicalObject
@URI
/PropertyQuery < QueryObject
/SCAModule < OriginalObject
/WSDLDocuments(.) -> WSDLDocument
/XSDDocuments(.) -> XSDDocument
/exportDocuments(.) -> ExportDocument
/importDocuments(.) -> ImportDocument
/moduleDocument(.) -> ModuleDocument
/SimpleTypeDefinition < XSDType
/Subscription < BaseObject
@emailAddress
@locale
@subscribedOperations
@subscribedTransitions
@targetBsrUri
@targetClassifications
@targetName
@targetNamespace
@targetVersion
/WSDLBinding < LogicalObject
/SOAPBinding < LogicalObject
@style
@transport
/portType(.) -> WSDLPortType
/WSDLDocument < Document
/importedWSDLs(.) -> WSDLDocument
/importedXSDs(.) -> XSDDocument
/includedXSDs(.) -> XSDDocument
/redefinedXSDs(.) -> XSDDocument
/WSDLMessage < LogicalObject
/messageParts is a WSDLPart
/xsdElement(.) -> ElementDeclaration
/xsdType(.) -> XSDType
/WSDLPortType < LogicalObject
/operations is a WSDLOperation
113
Supertypes
Supertypes cannot be accessed directly in an XPath query. However, concrete
types either inherit from supertypes or have an object type of one of the
supertypes. Therefore, supertype attributes and subtypes may appear in an
XPath query.
Note: The UserDefinedRelationship and UserDefinedProperty associations
on BaseObject are unavailable. Use the name of the relationship and the dot
function (.) to traverse these.
The supertypes map is as follows:
Example 3-3 Supertype map
/BaseObject
@bsrURI
@description
@lastModified
@name
@namespace
@owner
@version
/Export < LogicalObject
/exportBinding is an ExportBinding
/interfaces is an Interface
@preferredInteraction
/ExportBinding < LogicalObject
/Import < LogicalObject
/importBinding is an ImportBinding
/interfaces is an Interface
114
@preferredInteraction
/ImportBinding < LogicalObject
/Interface < LogicalObject
@preferredInteraction
/JMSExportBinding < ExportBinding
@dataBindingType
/JMSImportBinding < ImportBinding
@dataBindingType
/JMSExportBinding(.) -> JMSExportBinding
/LocalAttribute < LogicalObject
@attributeType
/LogicalObject < BaseObject
/document(.) -> Document
/OriginalObject < BaseObject
/predecessors(.) -> OriginalObject
/template(.) -> ComplexTypeDefinition
/QueryObject < OriginalObject
@queryExpression
/SCAExportBinding < ExportBinding
/SCAImportBinding < ImportBinding
/scaExportBinding(.) -> SCAExportBinding
/SCAWSDLPortType < Interface
/WSDLPortType(.) -> WSDLPortType
/SLSBImportBinding < ImportBinding
@jndiName
/SOAPAddress < LogicalObject
@location
/SOAPBinding < LogicalObject
@style
@transport
/WSDLOperation < LogicalObject
/faults(.) -> WSDLMessage
/inputMessage(.) -> WSDLMessage
/outputMessage(.) -> WSDLMessage
/WSDLPart < LogicalObject
/xsdElement(.) -> ElementDeclaration
/xsdType(.) -> XSDType
/WSDLPort < LogicalObject
/SOAPAddress < LogicalObject
@location
/binding(.) -> WSDLBinding
/WebServiceExportBinding < ExportBinding
/WSDLPort(.) -> WSDLPort
/WebServiceImportBinding < ImportBinding
/WSDLPort(.) -> WSDLPort
115
XSD files
The XSD files containing the XML schema definitions for all the WSRR types are
provided with the product. Go to <WSRR-Install-Root>\admin\schemas folder and
see WSRRGovernanceSDO.xsd WSRRSDO.xsd. They provide additional
information not available from the map, attribute types for example. However,
many of the types defined in the XSD files are not accessible in an XPath query;
the concrete types map should, therefore, always be used as the starting point
for constructing a query.
116
117
3.9.4 Limitations
Note that not every possible XPATH expression is supported. Listed here are
some of the limitations of WSRR queries:
Predicates filtering //* may only access attributes defined on BaseDocument.
The effective type of the target of a user-defined relationship is BaseObject.
This limits the attributes and relationships available to further terms in the
query.
You cannot query based on the inheritance hierarchy of the SDOs.
Multi-valued attributes are not supported. In general, multi-valued attributes
have been replaced by elements with children.
It is not possible to return the targets of relationships defined on extension
types in the SCA model. For example, query i below will not work. Instead, run
query 2 and access the WSDLPortType programmatically:
a. /WSRR/Module/(imports treat as
element(imports,SCAWSDLPortType))/WSDLPortType(.)
b. /WSRR/Module/(imports treat as element(imports,SCAWSDLPortType))
The flexibility of user-defined relationships and inheritance can easily cause
the underlying complexity of a query to expand exponentially. Therefore in
WSRR V6.0, no more than two of the following can be included in any query,
to guarantee it finishes before the timeout expires:
Traversals of relations defined by supertypes
Traversals of user-defined relationships
Access to user-defined properties
118
Chapter 4.
119
120
ServiceRegistryClient
ServiceRegistryClient.jar can be found in your WSRR installation directory. It
contains the following functionality:
WSRR SDO Objects
Helper classes (for creating objects and manipulating them)
Core EJB Client
Governance EJB Client
Ontology EJB Client
Web Services generated code
WSRR Core Web services client (calls the generated code)
SDO2 classes
Renamed EMF (required by the SDO2 runtime)
Figure 4-1 on page 122 illustrates how ServiceRegistryClient.jar can be used to
communicate with the WSRR server. The Ontology Web service is shown
separate to ServiceRegistryClient.jar as no special client code is needed to
access that Web service. See 4.2.1, Creating a Web services client on
page 136 for more information.
121
ServiceRegistry.ear
ServiceRegistryClient.jar
Core
Web service
http/https
Core WS
EJB
Plugins
WSRR Obj.
Helpers
Core
Core
EJB
Governance
Governance
EJB
Ontology
Ontology
EJB
Ontology
Web service
Ontology WS
EJB
Impl
try {
// look up the home
ServiceRegistrySessionHome ejbHome = (ServiceRegistrySessionHome)
PortableRemoteObject.narrow(context.lookup("ejb/ServiceRegistrySession"),
ServiceRegistrySessionHome.class);
// create the client
122
123
Creating a GenericObject
The SDO DataFactory is used to create a GenericObject.
The namespace used to create WSRR dataobjects is:
http://www.ibm.com/xmlns/prod/serviceregistry/6/0/sdo
This is defined in a TypeConstants helper class.
Example 4-2 Creating a GenericObject
try {
GenericObject go =
(GenericObject)DataFactory.INSTANCE.create(TypeConstants.SR_URI,TypeCon
stants.TYPE_GENERICOBJECT);
go.setName(GenericObject1);
go.setLocation(location1);
go.setVersion(1);
String bsrURI = serviceRegistry.create(go);
} catch (ServiceRegistryException e) {
// handle exception;
}
124
try {
WSDLDocument wsdlDoc = (WSDLDocument)SRXMLHelper.INSTANCE.load(new
FileInputStream(C:/my.wsdl),TypeConstants.TYPE_WSDLDOCUMENT);
wsdlDoc.setName(myWsdl);
wsdlDoc.setLocation(my.wsdl);
wsdlDoc.setVersion(1);
String bsrURI = serviceRegistry.create(wsdlDoc);
} catch (ServiceRegistryException e) {
// handle exception;
} catch (FileNotFoundException e) {
// handle exception;
} catch (IOException e) {
// handle exception;
}
125
Resolving dependencies
In the case of WSDL and XML Schema files, WSRR will attempt to resolve
references to other documents that have a full URL specified for the location of
the dependency. WSDL has one mechanism for referring to another file: the
wsdl:import element. XML Schema has three mechanisms:
xsd:include
xsd:import
xsd:redefine
Any imported documents are related to the original document by a modelled
relationship. For example, WSDLDocument has a modelled relationship called
importedWSDLs that contains the other WSDL documents that are imported by
the root WSDL document.
Dependencies can also be satisfied by documents already in WSRR. Matching is
based on the appropriate combination of namespace and location (name). For
example, if w1.wsdl is a WSDL document that contains
<wsdl:import namespace="someNamespace" location="w2.wsdl">
and a document already exists in WSRR with a name/location of w2.wsdl and a
targetNamespace of someNamespace then when w1.wsdl is saved the import
will be resolved to w2.wsdl in WSRR, and the importedWSDLs relationship on
w1.wsdl will be updated appropriately.
126
the normal processing of dependencies will take place, with a dependency being
satisfied from a document in WSRR if the appropriate document already exists in
WSRR, or an attempt to download the dependency from the URL used to refer to
the dependency.
A GenericObject can contain a relationship to another GenericObject, either a
new GenericObject or an existing one. If a GenericObject contains a relationship
to another GenericObject, then both GenericObjects will be saved.
All of the documents referenced from all of the GenericObjects referenced from
the root GenericObject are considered when looking to satisfy a dependency,
and it is an error if there is more than one document in the set of documents that
can satisfy a single dependency.
A GenericObject can have multiple relationships and all documents in all
relationships are treated equally.
It is possible to save a set of GenericObjects with circular dependencies but there
is no advantage to having circular dependencies and they should generally be
avoided.
127
HHH.xsd in the collection will match against the import in GGG.wsdl so the import
will be satisfied by Version 1.2 of HHH.xsd and this will be reflected in the
importedSchemas relationship of GGG.wsdl.
A GenericObject can have a dependency on another GenericObject, and if the
GenericObject has relationships to other documents, then the dependencies can
be satisfied by any of the documents related to the second GenericObject.
When a document is included in more than one collection, with different versions
of its dependencies, then all of the dependencies are added to the appropriate
relationships. For example, if W1.wsdl is a WSDL document at Version 1.0 and it
imports X1.xsd at Version 1.0 then the importedSchemas relationship on the
WSDLDocument representing W1.wsdl will include Version 1.0 of X1.xsd. If a
collection is created that includes the same version of W1.wsdl but in this case
Version 1.1 of X1.xsd is required, when the collection is saved, the
importedSchemas relationship on the WSDLDocument representing W1.wsdl will
have two XSDDocuments: one for the original Version 1.0 of X1.xsd and the
second for Version 1.1 of X1.xsd.
Creating a QueryObject
The SDO DataFactory is used to create the different types of QueryObject.
This is illustrated in Example 4-4.
Example 4-4 Creating a QueryObject using the Java API
GraphQuery query =
(GraphQuery)DataFactory.INSTANCE.create(http://www.ibm.com/xmlns/prod/s
erviceregistry/6/0/sdo,GraphQuery);
PropertyQuery query =
(PropertyQuery)DataFactory.INSTANCE.create(http://www.ibm.com/xmlns/pro
d/serviceregistry/6/0/sdo,PropertyQuery);
/*
* Retrieve a document with a known bsrURI. If we know the bsrURI for a
* document it can be retrieved using the retrieve() method. If we
* didn't know the bsrURI we would need to find it using a query
*
128
* The "namespace" property will have been set from the original XML
* content and the "location" property will have been set from the
* original document location.
*/
System.out.println(" retrieving document");
WSDLDocument storedDoc =
(WSDLDocument)serviceRegistry.retrieve(wsdlBsrURI);
System.out.println("
document found:");
System.out.println("
name = " + storedDoc.getName());
System.out.println("
namespace = " + storedDoc.getNamespace());
System.out.println("
version = " + storedDoc.getVersion());
System.out.println("
location = " + storedDoc.getLocation());
If the bsrURI is not known then a query would need to be run to find it, as
described in 4.1.6, Querying content in WSRR on page 130.
try {
// set the bsrURI to the value of a stored WSDLDocument
String wsdlBsrURI = bsrURI;
WSDLDocument documentStored = (WSDLDocument) serviceRegistry
.retrieve(wsdlBsrURI);
// add user defined properties
BSRSDOHelper.INSTANCE.addProperty(documentStored, "prop1",
"value1");
BSRSDOHelper.INSTANCE.addProperty(documentStored, "prop2",
"value2");
// update the document
serviceRegistry.update(documentStored);
} catch (ServiceRegistryException e) {
// handle exception
129
/*
* Delete a document we no longer need. Documents must be deleted by
* passing the bsrURI to the delete() method.
*/
serviceRegistry.delete(wsdlBsrURI);
130
try {
GraphQuery query = (GraphQuery) DataFactory.INSTANCE.create(
TypeConstants.SR_URI, TypeConstants.TYPE_GRAPHQUERY);
// retrieve all the XMLDocuments in the registry
query.setQueryExpression("/WSRR/XMLDocument");
List graphQueryResults = serviceRegistry.executeQuery(query);
for (int i = 0; i < graphQueryResults.size(); i++) {
XMLDocument doc = (XMLDocument) graphQueryResults.get(i);
System.out.println(doc.getBsrURI());
System.out.println(doc.getName());
}
} catch (ServiceRegistryException e) {
// handle exception
}
Example 4-9 Using PropertyQueries with the Java API
try {
PropertyQuery query = (PropertyQuery)DataFactory.INSTANCE.create(
TypeConstants.SR_URI, TypeConstants.TYPE_PROPERTYQUERY);
// retrieve all the XMLDocuments in the registry
query.setQueryExpression("/WSRR/XMLDocument");
BSRSDOHelper.INSTANCE.addProperty(query, "p1", "description");
BSRSDOHelper.INSTANCE.addProperty(query, "p2", "name");
List propertyQueryResults = serviceRegistry.executeQuery(query);
// process each PropertyQueryResultObject found in the list
for (int i = 0; i < propertyQueryResults.size(); i++) {
PropertyQueryResult pqr = (PropertyQueryResult)
propertyQueryResults.get(i);
// get the name
String name =
BSRSDOHelper.INSTANCE.getPropertyQueryResultValue(propertyQueryResult,"
name"));
131
PropertyQuery
A PropertyQuery returns only a subset of the properties of the objects that match
the query expression. The properties to be returned are specified as the values
of user-defined properties on the PropertyQuery object.
For example, to return the name and description properties, add two
user-defined properties to the instance of PropertyQuery, one with the value
name and the other with the value description. The properties to be returned
must be specified in property values because query objects extend BaseObject
and therefore have their own name, description, and so on.
GraphQuery
GraphQueries retrieve SDO object graphs that represent data held in WSRR. A
depth parameter can be specified on the GraphQuery object that allows you to
specify the depth of relationships that are resolved in the object graph that is
returned.
Specifying a depth parameter of -1 means that a complete object graph is
returned. For example, if a query with depth parameter of -1 returns a single
WSDLService element, you can then programmatically follow all the
relationships (both predefined and user-defined) from the root WSDLService
object that is returned from the query.
Specifying a depth parameter of 0 implies that only the objects that have been
queried for are returned and so you can access all the properties for a given
object, but cannot access any related object programmatically without executing
an additional query.
Predefined queries
WSRR has a number of predefined queries, all of which are GraphQueries with a
depth of 0. Table 4-1 on page 133 lists the queries, giving the name of the query,
a description of the query and a description of the parameters of the query, if any.
132
When supplying the modelled attribute name and attribute value, pass in a String
array:
String[] params = new String[] { "attribute name", "attribute value"};
Table 4-1 WSRR predefined queries
Name of Query
Description
Parameters
getAllWSDLDocuments
None
getAllXSDDocuments
None
getAllPolicyDocuments
None
getAllXMLDocuments
None
getAllServices
None
getAllPorts
None
getAllBindings
None
getAllPortTypes
None
getAllOperations
None
getAllMessages
None
getAllParts
None
getAllElementDeclarations
None
getAllComplexTypeDefinitions
None
getAllAttributeDeclarations
None
getWSDLDocument
1.
getXSDDocument
1. Modelled attribute
name
2. Attribute value
getPolicyDocument
1. Modelled attribute
name
2. Attribute value
getXMLDocument
1. Modelled attribute
name
2. Attribute value
Modelled attribute
name
2. Attribute value
133
Name of Query
Description
Parameters
getWSDLDocServices
getWSDLDocSOAPPorts
getWSDLDocBindings
getWSDLDocSOAPBindings
getWSDLDocPorts
getWSDLDocPortTypes
getWSDLDocOperations
getWSDLDocMessages
getWSDLDocParts
getXSDElements
getXSDSimpleTypeDefs
134
Name of Query
Description
Parameters
getXSDComplexTypeDefs
getXSDAttributeDeclarations
getWSDLServices
1. Modelled attribute
name
2. Attribute value
getWSDLPorts
1.
getWSDLPortTypes
1. Modelled attribute
name
2. Attribute value
getAllGenericObjects
None
getUserDefinedRelationshipN
ames
None
getGovernanceRecord
Modelled
attribute name
2. Attribute value
Example 4-10 illustrates how to use the WSRR predefined queries to retrieve the
relationship names from the query results list.
Example 4-10 Using WSRR predefined queries to retrieve the relationship names
135
(PropertyQueryResult)propertyQueryResults.get(index);
relationshipNames.add(BSRSDOHelper.INSTANCE.getPropertyQueryResultValue(pr
opertyQueryResult,"name"));
}
136
Web Service
ServiceRegistry.ear
Generated Client
WSRRCoreSDOClient
ServiceRegistryClient.jar
Custom Binding
Custom Binding
The WSRRCodeSDOClient allows the user to work with SDO objects directly
and call methods that take the same parameters as the EJB methods.
It has two constructors, one of which takes a userid and password:
com.ibm.serviceregistry.ws.WSRRCoreSDOClient(java.lang.String endpoint)
com.ibm.serviceregistry.ws.WSRRCoreSDOClient(java.lang.String endpoint,
java.lang.String username, java.lang.String password)
The URL to access the Core Web service is:
http(s)://localhost:port/WSRRCoreSDO/services/WSRRCoreSDOPort
The URL to access the Ontology Web service is:
http(s)://localhost:port/WSRROntologyWS/services/WSRR_Ontology_Port
137
try {
String url = http://localhost/WSRRCoreSDO/services/WSRRCoreSDOPort;
WSRRCoreSDOClient serviceRegistry = new WSRRCoreSDOClient(url);
} catch (ServiceException e) {
// do something
} catch (MalformedURLException e) {
// do something
}
138
http://www.ibm.com/xmlns/prod/serviceregistry/6/0/ws/ontology/binding =
com.yourcompany.ontology.service
http://www.ibm.com/xmlns/prod/serviceregistry/6/0/ws/ontology/portType
= com.yourcompany.ontology.service
http://www.ibm.com/xmlns/prod/serviceregistry/6/0/ws/ontology/schema =
com.yourcompany.ontology.service
http://www.ibm.com/xmlns/prod/serviceregistry/6/0/ontology/sdo =
com.yourcompany.ontology.types
Example 4-12 shows an example of how to use the generated ontology Web
service client.
Example 4-12 Using the generated Ontology Web service client
139
DataGraphType
Many of the operations have one or more instances of DataGraphType as part of
either an input message or an output message.
This is a specialization of the standard SDO DataGraphType. The
DataGraphType as used by WSRR contains either an instance of the WSRR type
or an instance of the PropertyQueryResult type as the root object.
The data graphs used by WSRR are defined by the XML Schema element shown
in Example 4-13.
Example 4-13 SOAP API DataGraph XML schema
WSRR
The artefacts element contains all the objects in the graph of objects that are not
contained in any other object in the graph of objects.
For example, if the graph consists of two WSDLDocument objects, both objects
will be in the artefacts, whereas if the graph consists of a WSDLService and its
WSDLPorts then only the WSDLService will be an artefact as the WSDLPorts
are contained by the WSDLService.
The WSRR type is defined by the XML Schema type shown in Example 4-14 on
page 141.
140
<xs:complexType name="WSRR">
<xs:sequence>
<xs:element name="root"
type="xs:IDREF"
nillable="false"
sdoxml:propertyType="tns:BaseObject"/>
<xs:element name="artefacts"
type="tns:BaseObject"
nillable="false"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
The root element contains the bsrURI value of the object that is the root of the
graph of objects contained by the WSRR instance.
PropertyQueryResult
The PropertyQueryResult contains the set of properties specified in the query,
for one object that matched the query. Each object matching the query is sent
back as a separate instance of DataGraphType.
The PropertyQueryResult is defined by the XML Schema type shown in
Example 4-15.
Example 4-15 SOAP API PropertyQueryResult XML schema
<xs:complexType name="PropertyQueryResult">
<xs:sequence>
<xs:element name="userDefinedProperties"
type="tns:UserDefinedProperty"
minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
141
As the type of the bsrURI attribute is the XML Schema ID type, the values must
be compatible with the NCName type, which means that a bsrURI must begin
with a Letter or with the underscore '_' character. As normal bsrURI values begin
with a Letter, a temporary bsrURI value must begin with a '_' character.
Document content
When working with documents, the content of the document is represented as
the value of an attribute named content, and it is encoded using base64
encoding.
Error handling
All of the operations return a ServiceRegistryWebServiceException fault.
The fault contains the message from the exception thrown by the WSRR server.
WSRR portType
The WSRR SOAP API is a document-literal SOAP/HTTP binding of a portType
that provides the following operations:
create
delete
executeNamedQuery
executeNamedQueryWithParameters
executeQuery
retrieve
retrieveWithDepth
update
All the operations are documented in more detail in the WebSphere Service
Registry and Repository Information Center, we will cover create only here, as
an example:
http://publib.boulder.ibm.com/infocenter/sr/v6r0/topic/com.ibm.sr.do
c/rwsr_soap_api_guide11.html
Create
The createRequest message is an instance of the create element, which
consists of a single datagraph element.
The definition of the create operation is as follows.
142
<wsdl:operation name="create">
<wsdl:input name="createRequest" message="impl:createRequest"/>
<wsdl:output name="createResponse" message="impl:createResponse"/>
<wsdl:fault name="ServiceRegistryWebServiceException"
message="impl:ServiceRegistryWebServiceException"/>
</wsdl:operation>
The createResponse message is an instance of the createResponse element,
which contains a single string which is the bsrURI value assigned by WSRR to
the root object of the request datagraph.
The following message (Example 4-17) is an example of a create request that
represents creating a single document, in this case an XMLDocument. A single
user-defined property is defined at the time of creation.
Note the use of the temporary bsrURI value of "_1" to refer to the root object.
Example 4-17 Example create a document using the SOAP API
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<p244:create
xmlns:p244="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/ws/sdo">
<p905:datagraph xmlns:p905="commonj.sdo">
<p533:WSRR
xmlns:p533="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/sdo">
<p533:root>_1</p533:root>
<p533:artefacts xsi:type="p533:XMLDocument"
bsrURI="_1"
name="CreateSingleObjectTestDocument"
namespace="http://www.ibm.com/colgrave/WSRR/test"
description="Single document created via JAX-RPC"
content="PD94bWwgdmVyc2lvbj0iMS4wIj8+DQo8cm9vdC8+DQo="
location="hexbinarytest.xml">
<p533:userDefinedProperties
name="UserDefinedPropertyOne" value="ValueOne"/>
</p533:artefacts>
</p533:WSRR>
</p905:datagraph>
143
</p244:create>
</soapenv:Body>
</soapenv:Envelope>
The following message (Example 4-18) is an example of a successful response
message.
Example 4-18 Example of a successful response to a create document using SOAP API
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<p244:createResponse
xmlns:p244="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/ws/sdo">
<createReturn>
WSRR--c8e644f7.fa84a879.29e0adb9.10db8541a90.6ae36dd4.46
</createReturn>
</p244:createResponse>
</soapenv:Body>
</soapenv:Envelope>
Other examples of using the SOAP API can be found in the WebSphere Service
Registry and Repository Information Center:
http://publib.boulder.ibm.com/infocenter/sr/v6r0/topic/com.ibm.sr.do
c/rwsr_soap_api_guide11.html
144
This section describes the concepts and architecture of the Service Registry and
Repository Web user interface. Chapter 10, Customizing the Web UI on
page 381 goes into more detail on how to configure the WSRR user interface.
Banner
Workarea
Navigation
The only portion of the Web user interface that cannot be customized is the
banner. However, if you deploy a custom perspective to WSRR that the current
user is permitted to view, the display name of the custom perspective will appear
in the User perspective list within the banner frame. The user can then switch to
the custom perspective by selecting its name from the list and clicking Go.
145
The content that is displayed within the Navigation and Workarea frames is
controlled by a number of XML definition files. A set of system definition files is
loaded into WSRR as part of the installation process. These files define the
Administrator and User perspectives that are available by default within WSRR.
The XML definition files for these system perspectives can be modified to tailor
them to your business needs.
There are five different types of definition files used by the WSRR user interface,
as follows:
Perspective
Navigation Tree
Collection View
Detail View
View Query
Certain definition files may reference objects that are defined in other definition
files. For instance, a perspective definition must specify the navigation tree that
will be displayed when a user is viewing that perspective as well as the collection
views and detail views that should be used when viewing different types of object
within the perspective. The dependencies that exist between the different types
of definition file form a hierarchical structure for any given perspective, as shown
in Figure 4-5 on page 147.
146
Perspective
Navigation
Tree
Detail
View
Collection
View
View
Query
The sections that follow describe the key concepts of each of the definition file
types used by the WSRR user interface.
4.3.2 Perspectives
A perspective defines the views that users will see when they are browsing the
content of WSRR in the context of that perspective. More specifically, a
perspective defines:
The user roles whose members are permitted to view the perspective.
The navigation tree that will be displayed in the Navigation frame.
The collection views that will be used when displaying collections of objects in
the Workarea frame.
147
The detail views that will be used when displaying a specific object in the
Workarea frame.
A perspective is intended to provide the user with a consistent view of the data
within WSRR. For instance, a Business Analyst perspective would display a
navigation tree and a number of detail views and collection views that all use
consistent terminology that is meaningful to a business analyst. A Service
Developer perspective, on the other hand, would display a different navigation
tree, detail views, and collection views that would be likely to use more technical
terminology that is meaningful to a service developer.
Note: Role-based views
It is recommended that, when you are defining custom perspectives, you
attempt to use consistent terminology and display similar sets of metadata
across all of the views that are used by that perspective. Designing a
perspective in this way should ensure that it provides a role based view onto
the data stored within WSRR.
Roles
WSRR defines the Administrator and the User roles. You can use these roles
when creating a perspective to define the users that are permitted to view that
perspective. By default, any user that is able to log into the Web user interface is
able to see all perspectives that are visible to the User role. However, it is
possible to define additional roles to WSRR that match the roles performed by
the users in your organization. Users or groups can then be mapped to these
custom roles and the visibility of a perspective can then be restricted to just those
users or groups that are mapped to the custom role.
148
Perspective
Navigation
Tree
Perspective
Detail
View
Collection
View
View
Query
Navigation
Tree
View
Query
Due to the loose coupling that exists between the various definition files that
make up a perspective, WSRR does not mandate the order in which the files
must be loaded. As a result, the Web user interface delays attempting to resolve
any of the references between the files until they are required at runtime. This
late binding allows a perspective within the Web user interface to continue to
operate even if some of the view definitions that are referenced by the
perspective have not been loaded into WSRR. It is only when the user attempts
to navigate to an area of the perspective with the missing view definitions that
any problems will occur. At this point, a suitable error message will be displayed
and a WSRR administrator will need to take suitable action to resolve the
problem.
149
are searched when attempting to resolve the collection or detail view definition
that should be used to display a certain type of object. By default, the WSRR
Web user interface will simply use the name of the underlying SDO object type in
order to select a suitable view definition to use to display the data. For instance, if
you are attempting to view the details of a WSDL document object, the Web user
interface will attempt to find a view definition within your current perspective that
is mapped to WSDLDocument.
However, it is possible to control how a perspective selects the view definition to
use when displaying an object. This is achieved using display types in the other
types of definition files within the user interface. If a display type is specified, this
display type is passed to the perspective and used when attempting to resolve
the view definition mapping instead of the name of the underlying SDO type. In
effect, when you use display types within view query, collection view or detail
view definitions you are stating that you want the information displayed using a
specific view definition.
For additional details on perspectives, see 10.4, Perspectives on page 394.
150
specify the collection view that should be used to display the results of the
query.
Figure 4-7 shows how the navigation tree definition file links the nodes within the
navigation tree to the corresponding view queries that will be executed when the
node is selected.
<node id="wsdl"
node-resource-key="wsdLinstances"
view-query-id="showWSDLDocuments"/>
Navigation
Tree
Definition
<Query id="showWSDLDocuments">
<ObjectType>WSDLDocument</ObjectType>
</Query>
View
Query
Definition
151
detail view for the object on the corresponding row in the collection view. A
collection view can control the detail view definition that is used to display the
details of the selected object by specifying a display type. Recall that, if a display
type is specified the Web user interface will attempt to resolve it to a detail view
definition using the mappings defined within the current perspective. If a display
type is not specified, the Web user interface uses the SDO type name of the
object in the selected row to find the detail view definition to use.
Figure 4-8 shows the areas of a collection view that are controlled by a collection
view definition.
Title
Description
Button Definitions
Column
Definition
Column
Definition
Column
Definition
Column
Definition
152
However, currently the only type of tab that supports customization is the Details
tab. The area of a detail view defined with a tab definition is shown in Figure 4-9.
Tab Definition
The way in which a property is displayed on the details tab within a detail view
depends on the type of the property itself and where in the detail view it is
displayed. The details tab is divided into a General Properties section and
multiple Additional Properties sections, as shown in Figure 4-10 on page 154.
153
Additional
Properties
General
Properties
Additional
Properties
Additional
Properties
Properties that are displayed within the General Properties section of the details
view must be of type string. The value of the property is displayed within a text
entry field. Properties that are displayed in an Additional Properties section of the
details view must represent a reference to another object or objects in WSRR.
Properties displayed in the Additional Properties section of a details view are
displayed as HTML links. Selecting one of these links navigates the user to a
detail or collection view for the corresponding property on the object in question.
A detail view can control the view definition that is used to display the resulting
page by specifying a display type. Recall that, if a display type is specified the
Web user interface will attempt to resolve it to a view definition using the
mappings defined within the current perspective.
154
standalone Jython or Jacl interpreter, or it may be run inside wsadmin and used
in conjunction with the facilities available there. Several example scripts show
you how to perform governance tasks such as promoting entities from one
WSRR to another, or transitioning entities through different lifecycle states.
See 8.6, Administering WSRR using the CLI on page 299 for information about
how to configure the CLI and how to use it for administrative functions. Several
sample scripts are provided with the CLI that illustrate how to use it for both user
and administrative tasks, more details on these scripts can be found in 8.6.3,
Sample scripts on page 306.
155
156
Chapter 5.
157
5.1 Overview
As discussed in Chapter 1, Introduction to SOA on page 3, SOA dramatically
increases the dynamism of your information system. More accurately, it provides
a means for you to address the requirements for dynamism that most businesses
are already facing. The basic tenet of SOA is to provide an information system
that is responsive to the rate of change faced by your business in its markets.
But that dynamism also brings additional risks, for example:
The risk that someone will change a business process in a way that is
detrimental to the business.
That someone will change a business process or service that places
unexpected and excessive demand on the capacity of the information system,
either crashing the system or having an adverse affect on the other processes
also being served by the information system.
That someone will introduce rogue software that siphons critical business
information.
That someone will change the configuration of the system in way that disrupts
the business.
For these reasons, the SOA lifecycle is layered on a backdrop of a set of
governance processes that ensure that compliance and operational policies are
enforced, and that change occurs in a controlled fashion and with appropriate
authority as envisioned by the business design.
It must be stressed that the scope of governance within an SOA environment
extends beyond any single product. However, WebSphere Service Registry and
Repository is a powerful enabler for SOA governance and provides a number of
mechanisms that allow you to implement the governance processes that have
been specified within your business design. These mechanisms are discussed in
the sections that follow.
5.2 Lifecycles
WebSphere Service Registry and Repository provides support for the definition
and enforcement of lifecycles which can be applied to the objects that it stores.
The process of applying a lifecycle to an object within WSRR is referred to as
making the object governable. An object that currently has a lifecycle applied to it
is referred to as a governed object or governed entity. If, at some point, you
158
decide that you no longer want to apply a lifecycle to an object, you can remove
governance from the object.
Note: Referring to objects in WSRR that have a lifecycle applied to them as
governed objects is a little misleading. It is possible to apply other aspects of
SOA governance to objects within WSRR, such as security and validation,
without applying a lifecycle to the objects. Indeed, applying a lifecycle to an
object in WSRR is optional. However, within this book, when we refer to
governed objects, we are referring to objects that have a lifecycle applied to
them.
During the installation process a simple default lifecycle is loaded into WSRR.
This default lifecycle provides the minimum capability to govern an object, or
collection of objects, in WSRR. This lifecycle is adequate for use in a proof of
concept or for prototyping. However, you should consider defining and deploying
a lifecycle that is more representative of the governance processes defined
within your organization. For more information about replacing the lifecycle
definition in WSRR, see the WebSphere Service Registry and Repository
Information Center:
http://publib.boulder.ibm.com/infocenter/sr/v6r0/topic/com.ibm.sr.do
c/twsr_configrn_governance02.html
159
transition method on the governance API (the Web user interface uses this
method when transitioning objects as the result of a user action).
Transitions
A transition is the movement that occurs when a governed object moves from
a source state to a target state, as the result of a triggering event. The
transitions that are available for a governed object can be determined by
looking at the transitions whose source state match the current lifecycle state
the object.
160
161
SACL
XSLT
XSLT Processor
OWL
162
<owl:Class
rdf:about="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/governance
/DefaultLifecycle#InitialState1">
<rdfs:label>Created</rdfs:label>
<rdfs:label xml:lang="de">Erstellt</rdfs:label>
<rdfs:label xml:lang="it">Creato</rdfs:label>
...
<rdfs:comment>This initial state represents the default state of a
newly created governed collection.
</rdfs:comment>
<rdfs:comment xml:lang="de">Dieser Anfangszustand gilt als
Standardzustand einer neu erstellten regulierten Sammlung.
</rdfs:comment>
<rdfs:comment xml:lang="it">Questo stato iniziale rappresenta lo
stato predefinito di una collezione governata appena creata.
</rdfs:comment>
...
</owl:Class>
163
Initial State
Created
Plan
Assemble
Certify
Model
AuthorizeDevelopment
Repair
Deploy
Approve
Revoke
Manage
Retired
Final State
Deprecate
Figure 5-2 WSRR default lifecycle
Created
The Created state represents the initial state of any object, or collection of
objects, within WSRR that is made governable. The transitions that are available
from this state are:
Plan
Performing the Plan transition moves the object, or collection of objects, from
the Created state to the Model state.
Model
In the IBM SOA Foundation lifecycle, modelling is described as the process of
capturing your business design from an understanding of business requirements
and objectives and translating that into a specification of business processes,
goals and assumptions creating an encoded model of your business.
In the context of WSRR, several tasks may be performed when a service is in the
model state including, but not limited to, the following:
Defining the business concepts that are required in order to fully describe
your services within WSRR.
Defining the metadata that must be added to the different types of artefacts
that you will store within WSRR.
Defining who should be allowed to access WSRR and what types of objects
they should be allowed to access.
Identifying existing service artefacts that your new services may depend on.
164
Assemble
Services that are in the Assemble state in WSRR are in the process of being
developed and tested. This occurs when the service interface has been defined
and published to WSRR in order to socialize the interface, but the implementation
of the service is not yet complete. This approach allows clients of the new service
to be developed before the service is actually deployed, or for the new service to
be included in composite business process definitions.
Several of the WSRR artefacts that were identified during the Model phase of the
SOA lifecycle may also be created at this point. For instance, GenericObjects
may be created within WSRR or the service artefacts within WSRR may be
decorated with metadata.
The transitions that are available from this state are:
Certify
Performing the Certify transition moves the object, or collection of objects,
from the Assemble state to the Deploy state. This transition should be
performed once the implementation of the service is complete.
Deploy
Services that are in the Deploy state in WSRR are in the process of being
deployed to the target runtime environment and tested in that environment. The
length of time that a service may spend in the Deploy state depends on the
complexity of the service. For instance, a simple, self contained service that is to
be hosted in an existing environment might be deployed in a matter of minutes. A
business process, on the other hand, that requires several component services
to be deployed across multiple new hosting environments may take days, or even
weeks, to deploy.
The deployment process might also involve creating or updating service artefacts
within WSRR. For instance, additional artefacts that represent the endpoints of
the deployed services may be created, or metadata regarding the environment
on which the services are being hosted may be added to the service definition.
165
Manage
Services that are in the Manage state in WSRR are services that have been
deployed to a target runtime environment. At this point in the service lifecycle,
WSRR can be used to dynamically locate service endpoints at runtime.
Monitoring software, such as IBM Tivoli Composite Application Manager for
SOA, can also be used to monitor the performance of the services in the runtime
environment and update the service artefacts in WSRR with performance related
metadata. This metadata can, in turn, be used to affect the runtime routing
decisions of runtimes that use WSRR to dynamically locate service endpoints at
runtime.
The transitions that are available from this state are:
Deprecate
Performing the Deprecate transition moves the object, or collection of objects,
from the Manage state to the Retired state. This transition should be
performed once the service is no longer required or used by other services
within the SOA environment, maybe as a result of a newer version of the
service being deployed. Impact analysis can be performed to determine the
other services within the SOA that have a dependency on the service in
question.
Revoke
Performing the Revoke transition moves the object, or collection of objects,
from the Manage state back to the Deploy state. This transition could be
performed in order to take the service offline and prevent it from being
invoked by other services, maybe because certain quality of service issues
need to be addressed in the runtime environment. Once again, impact
analysis can be performed to determine the other services within the SOA
that have a dependency on the service in question.
166
Retired
Services that are in the Retired state in WSRR are services that have been
withdrawn from service and should no longer be used.
5.2.4 GovernanceRecords
The lifecycle state of a governed object in WSRR is not stored on the object itself.
Instead, GovernanceRecords are used to encapsulate all of the information
regarding the state of an object in the governance lifecycle. When an object in
WSRR is made governable, a corresponding instance of a GovernanceRecord is
created in order to maintain the state of that object within the governance
lifecycle. It is this GovernanceRecord that is used by the lifecycle state machine
in order to determine the transitions that are available for the governed object.
The lifecycle state machine also uses the GovernanceRecord when the
governed object is transitioned from one state to another within the lifecycle.
Table 5-1 describes the attributes of the GovernanceRecord.
Table 5-1 GovrnanceRecord attributes
Attribute name
Description
entityBsrURI
The entityBsrUri attribute contains the bsrUri of the object that was
made governable. The object that this bsrUri refers to is known as
the root object.
governedObjects
state
The state attribute defines the current lifecycle state of all of the
OriginalObjects in the governed collection.
167
GenericObject
PolicyDocument
SCAModule
WSDLDocument
XMLDocument
XSDDocument
168
Governed collections
Consider a simple scenario where an OriginalObject exists in WSRR that has no
predefined or user defined relationships to any other OriginalObjects. If this
object is made governable, then the only reference that is added to the list of
governed objects in the GovernanceRecord is the root object. This is shown in
Figure 5-3.
Governed
Governance
Record
Ungoverned
Make
Governable
WSDL
Root Object
WSDL
GovernedObjects
State
169
Ungoverned
Governed
XSD
XSD
Governance
Record
Make
Governable
WSDL
Root Object
WSDL
GovernedObjects
Generic
Object
170
State
XSD
XSD
Generic
Object
For clarity in the discussions that follow, we will group all of the references from
the list of governed objects in the GovernanceRecord and depict them as shown
Figure 5-5.
Governance
Record
Root Object
GovernedObjects
State
XSD
WSDL
XSD
Generic
Object
Governed Collection
Figure 5-5 The governed collection
171
Governance
Record
Root Object
Root Object
GovernedObjects
GovernedObjects
State
State
XSD
XSD
Add
Relationship
WSDL
WSDL
XSD
XSD
Generic
Object
XSD
Generic
Object
Governed Collection
XSD
Governed Collection
172
Governance
Record
Root Object
Root Object
GovernedObjects
GovernedObjects
State
State
XSD
XSD
Add
Relationship
WSDL
WSDL
XSD
XSD
Generic
Object
Governed Collection
Generic
Object
XSD
XSD
Governed Collection
173
Governance
Record
Root Object
Root Object
GovernedObjects
GovernedObjects
State
State
XSD
XSD
WSDL
WSDL
XSD
XSD
Generic
Object
Governed Collection
XSD
Governed Collection
In this situation, a relationship has been defined from the GenericObject in one
governed collection to the XSD the other governed collection. Because the target
XSD was already in a governed collection, it has not been added to the governed
collection containing the GenericObject.
174
Governance
Record
Root Object
Root Object
GovernedObjects
GovernedObjects
State
State
Remove
Relationship
XSD
XSD
WSDL
WSDL
XSD
XSD
Generic
Object
Generic
Object
XSD
Governed Collection
XSD
Governed Collection
In this situation, the relationship from the GenericObject to the XSD is removed.
As a result, the XSD is also removed from the governed collection containing the
GenericObject.
175
Governance
Record
Governance
Record
Root Object
Root Object
GovernedObjects
GovernedObjects
State
State
Remove
Relationship
XSD
Generic
Object
WSDL
XSD
Generic
Object
WSDL
XSD
XSD
Governed Collection
Governed Collection
176
is the only relationship tieing the target object to the governed collection, then the
entire branch of the object graph extending from the target object is removed
from the governed collection. This is shown in Figure 5-11.
Governance
Record
Governance
Record
Root Object
Root Object
GovernedObjects
GovernedObjects
State
State
Remove
Relationship
XSD
XSD
WSDL
WSDL
XSD
XSD
Governed Collection
Generic
Object
Generic
Object
XSD
XSD
Governed Collection
In this situation, the relationship from the XSD to the GenericObject is removed.
As a result, the branch of the object graph extending from the GenericObject is
removed from the governed collection. In this case, the object graph only
consists of the GenericObject and an XSD to which it is related. However, it is a
conceivable that, in a real world scenario, the number of objects removed from
the governed collection could be far more extensive.
It is also important to note that, during the process of removing an OriginalObject
from a governed collection, it will not be added to another governed collection.
This is the case, even if the object in question is the target of a relationship from
an OriginalObject in another governed collection. This is shown in Figure 5-12 on
page 178.
177
Governance
Record
Governance
Record
Root Object
Root Object
GovernedObjects
GovernedObjects
State
State
Generic
Object
WSDL
Generic
Object
Governed Collection 1
WSDL
Governed Collection 2
Remove Relationship
Governance
Record
Governance
Record
Root Object
Root Object
GovernedObjects
GovernedObjects
State
State
Generic
Object
WSDL
Governed Collection 1
Generic
Object
WSDL
Governed Collection 2
178
179
A more suitable lifecycle for these types of objects is shown in Figure 5-13. This
lifecycle does not define any operational states and, therefore, could be applied
to artefacts in WSRR for which there is no corresponding implementation.
Initial State
Specified
Approve
Approved
Deprecate
Deprecated
Final State
Figure 5-13 Sample lifecycle
180
Now consider the simple object graph shown in Figure 5-14. If the objects in this
object graph were loaded into WSRR, it would be logical to apply different
lifecycles to certain objects. For instance, it would make sense to apply the
lifecycle shown in Figure 5-13 on page 180 to the XSD and the PortType WSDL
documents. It might also make sense to apply the default lifecycle to the two
Service WSDL documents.
XSD
PortType
WSDL
Service
WSDL
Service
WSDL
However, to ensure that the appropriate lifecycle is applied to each of the objects
in the object graph, it is essential to make the objects governable in the correct
order.
181
If you were to make one of the Service WSDL documents governable, applying
the default lifecycle, both the PortType WSDL document and the XSD document
would also be added to the governed collection. This is shown in Figure 5-15.
Governed Collection
XSD
PortType
WSDL
Governance
Record
Root Object
GovernedObjects
Service
WSDL
Service
WSDL
State
But, as we have already discussed, the default lifecycle that is applied to the
Service WSDL document might not be appropriate for the PortType WSDL
document and the XSD document.
182
In order to ensure that the sample lifecycle can be applied to the PortType
WSDL document and the XSD document, these documents need to be made
governable before the Service WSDL document. Since the PortType WSDL
document imports the XSD document, this can be achieved by making the
PortType WSDL document governable and applying the sample lifecycle. This is
shown in Figure 5-16.
Governed Collection
XSD
PortType
WSDL
Governance
Record
Root Object
GovernedObjects
Service
WSDL
Service
WSDL
State
183
The first Service WSDL document can be then be made governable, applying
the default lifecycle, without affecting the governed collection of the PortType
WSDL document and the XSD document. This is shown in Figure 5-17.
Governed Collection
Governance
Record
XSD
Root Object
GovernedObjects
State
PortType
WSDL
Governance
Record
Root Object
GovernedObjects
Service
WSDL
Service
WSDL
State
Governed Collection
Figure 5-17 Applying the default lifecycle to the Service WSDL document
Of course, in a real world situation, it is unlikely that all of these artefacts would
have been loaded into WSRR at the same point in time. It is more realistic to
suggest that the underlying data model defined by the XSD document would be
designed first and then approved for use in the SOA environment. The service
interface defined by the PortType WSDL document would then be designed and
also approved for use in the SOA environment. Finally, the service
implementations would be developed and deployed, but not necessarily at the
same time.
184
In this scenario, it is quite conceivable that each of the artefacts in our sample
object graph would be loaded into WSRR at different points in time and,
consequently, would be contained within different governed collections. This is
shown in Figure 5-18.
Governance
Record
Governed Collection
Root Object
Governance
Record
Root Object
XSD
GovernedObjects
GovernedObjects
State
State
Governed Collection
PortType
WSDL
Governance
Record
Governance
Record
Root Object
Root Object
GovernedObjects
State
Service
WSDL
Service
WSDL
Governed Collection
Governed Collection
GovernedObjects
State
185
186
removed from the governed collection of the source object. You must examine
the object graph for the target object to ensure that any OriginalObjects that
are removed from the governed collection of the source object do not require
the relevant lifecycle to be applied.
187
Note: It is recommended that you modify the relevant environment script prior
to installation to ensure that only those users or groups who are permitted to
access WSRR are mapped to the relevant roles.
However, note that the Server user ID that is configured in your WebSphere
Application Server environment must be mapped to the Administrator J2EE
security role in WSRR. If this mapping is not defined, WSRR will fail to start
when running in a WebSphere environment where security has been enabled.
188
Note: Any roles that are defined to the authorization component in WSRR are
completely separate from the J2EE security roles defined within the
deployment descriptors for the WSRR application. At runtime WebSphere
Application Server is only aware of the Administrator and User J2EE security
roles.
To simplify the installation and configuration of WSRR, the installation process
creates roles within the WSRR authorization component that match the J2EE
security roles. That is, the installation process creates an Administrator and a
User role within the WSRR authorization component. It also maps the same
users and groups to these roles that are mapped to the J2EE security roles.
5.3.3 Permissions
A permission within WSRR encapsulates an action and the target objects on
which it can be performed. Adding a permission to a role grants the users who
are mapped to that role the permission to perform the specified action on the
specified target objects. This is shown in Figure 5-20.
Role
Name: Administrator
Permission
Permission
Permission
Name: CreateWSDLPermission
Name: CreateWSDLPermission
Action:
srrCreate
Name:
CreateWSDLPermission
Action: srrCreate
Target:
/WSRR/WSDLDocument
Action: srrCreate
Target:: /WSRR/WSDLDocument
The sections that follow describe the properties that can be defined on a
permission within WSRR.
189
Name
The name of the permission is used to identify the permission within WSRR. The
name of a permission must be unique within the context of a specific role. It is
possible, therefore, to create permissions with the same name on different roles.
Note: It is recommended that you use unique permission names for all of the
permissions that you define to the WSRR authorization component.
Action
The action property for a permission specifies the operation that the permission
authorizes. Table 5-2 describes the actions that can be specified for permissions
in WSRR.
Table 5-2 Valid actions for WSRR permissions
190
Name
Description
srrCreate
srrRetrieve
srrUpdate
srrDelete
srrTransition
srrManageGov
Note: The permissions that are defined using these actions are completely
independent of each other. For example, defining a permission to allow a
specific type of artefact to be deleted does not imply that permission to update
that type of artefact is automatically granted.
Target
The target property for a permission specifies the objects in WSRR to which the
permission applies. The target is specified using the WSRR query language. As
discussed in 3.6, XPath on page 99, the WSRR query language is based on a
subset of XPath 2.0 with support for Service Data Objects (SDO) properties,
relationships, and some additional functions to support querying by classification.
A simple example of a query expression is shown here:
/<PathExpression>[<FilterExpression>]
The <PathExpression> element defines the type of object to which the
permission applies and must match one of the types described in Chapter 3,
Information model on page 79. The type specified can appear at any point in
the WSRR information model type hierarchy. For instance, if you specified a
<PathExpression> of /WSRR/BaseObject for a permission then that permission
would apply to all objects in WSRR, since all of the object types in the WSRR
information model extend BaseObject. If, however, you specified a
<PathExpression> of /WSRR/WSDLDocument then that permission would only apply
to objects of type WSDLDocument in WSRR, since this type has no sub-types.
Note: The <PathExpression> element must always be prefixed with /WSRR.
GenericObject
OriginalObject
PolicyDocument
SCAModule
WSDLDocument
XMLDocument
XSDDocument
QueryObject
GraphQuery
PropertyQuery
191
Example
Description
@property
@foo
@property=value
@foo=bar
classifiedByAnyOf
classifiedByAnyOf(
'classificationURI_1',
'classificationURI_2'
)
classifiedByAllOf
classifiedByAllOf(
'classificationURI_1',
'classificationURI_2'
)
Default permissions
WSRR adopts a permissive approach to access control in the authorization
component. This means that access to all of the artefacts in WSRR is
unrestricted by default. This approach allows users to continue to access objects
in WSRR when security is enabled, without the need to define permissions that
explicitly grants them access to these objects.
192
Administrator permissions
WSRR defines a set of default permissions that are used to control access to
governed objects. Table 5-4 describes the default permissions that are granted to
the Administrator role.
Table 5-4 Administrator default permissions
Permission
Description
Name:
GovernedCreatePermission
Action:
srrCreate
Target:
/WSRR/BaseObject[
classifiedByAnyOf(
'<URI>a#State'
)]
Name:
GovernedRetrievePermission
Action:
srrRetrieve
Target:
/WSRR/BaseObject[
classifiedByAnyOf(
'<URI>a#State'
)]
193
Permission
Description
Name:
GovernedUpdatePermission
Action:
srrUpdate
Target:
/WSRR/BaseObject[
classifiedByAnyOf(
'<URI>a#State'
)]
Name:
GovernedDeletePermission
Action:
srrDelete
Target:
/WSRR/BaseObject[
classifiedByAnyOf(
'<URI>a#State'
)]
Name:
GovernanceTransitionPermission
Action:
srrTransition
Target:
/WSRR/BaseObject
Name:
GovernanceManagePermission
Action:
srrManageGov
Target:
/WSRR/BaseObject
194
User Permissions
In isolation, the default permissions that are granted to the Administrator role
would prevent normal WSRR users from accessing governed objects. In order to
grant the User role a restricted level of access to governed objects, WSRR
defines a set of default permissions for this role. Table 5-5 describes the default
permissions that are granted to the User role.
Table 5-5 User default permissions
Permission
Description
Name:
GovernedUserUpdatePermission
Action:
srrUpdate
Target:
/WSRR/BaseObject[
classifiedByAnyOf(
'<URI>a#State1',
'<URI>a#State2',
)]
Name:
GovernedRetrievePermissionA
Action:
srrRetrieve
Target:
/WSRR/BaseObject[
classifiedByAnyOf(
'<URI>a#State1',
'<URI>a#State2',
)]
Name:
GovernedRetrievePermissionB
Action:
srrRetrieve
Target:
/WSRR/BaseObject[
classifiedByAnyOf(
'<URI>a#State3',
'<URI>a#State4',
)]
195
196
Note: While it is possible to modify these XACML files directly and load them
into WSRR, it is not recommended. The WSRR administration MBean
provides all of the operations that are required in order manipulate the
contents of these files, as follows:
addRole
removeRole
addPrincipalToRole
removePrincipalFromRole
getRolesWithPermissions
removePermissionFromRole
removeAllRolePermissions
removeAllRoles
addPermissionToRole
addPermissionToRole2
getPermissionsForRole
persistPolicy
persistRoleMappings
197
Note: The implementation classes for both validation and notification plugins
are able to make use of the WSRR API at runtime. However, they MUST avoid
creating instances of the ServiceRegistrySession or
ServiceRegistryGovernance EJBs within their constructors.
When an instance of one of these EJBs is created, it instantiates the set of
plugin instances that it will use to perform validation and notification for each
method invoked. If the constructors for any of the plugins create an instance of
one these EJBs, an infinite loop will occur. For this reason, plugins should
delay creating instances of these EJBs until the instance is actually required
(lazy initialization).
5.4.1 Validators
Validation plugins are invoked at the beginning of calls to certain WSRR API
methods. They provide you with an opportunity to validate that the operation
being performed on the objects within WSRR complies with the policies that are
defined within your SOA environment. For instance, there may be a policy within
198
your SOA environment that states that all Web services deployed to the SOA
must be compliant with Version 1.0 of the WS-I Basic Profile.
A validator is also able to modify the objects that are passed to WSRR. This
provides you with an opportunity to define additional metadata on the objects
before they are persisted to the database.
This is the approach taken in the template validator that is provided with WSRR.
This validator is used when creating instances of an OriginalObject from a
template. The template validator modifies the OriginalObject during creation to
add the properties and relationships that are defined on the relevant template.
Validator interfaces
The validator interfaces defined by the WSRR API are shown in Figure 5-22.
Notice that there are actually two validator interfaces defined by the API. The
ServiceRegistryValidator interface defines the methods that you should
implement if you require validation to occur as a result of invoking operations on
the WSRR Core API. The ServiceRegistryGovernanceValidator interface
extends the ServiceRegistryValidator interface and defines additional
methods that you should implement if you require validation to occur as a result
of invoking operations on the WSRR Governance API.
199
Create method
The create method is invoked before an instance of an OriginalObject is created
in WSRR. The create method is passed a reference to the OriginalObject that is
about to be created in order to perform the required validation tasks. The
validator is able to modify this object to ensure that it conforms with the relevant
governance policies that are in place before it returns from the create method.
The create method must return a ServiceRegistryStatus object to indicate
whether the validation process succeeded or failed. If the create method returns
a SUCCESS or WARNING return code in the ServiceRegistryStatus object,
WSRR will persist the new object.
If the create method returns an ERROR return code in the
ServiceRegistryStatus object, WSRR will throw a
ServiceRegistryValidationException from the invoked WSRR API method and
the new object will not be created in WSRR.
Update method
The update method is invoked before an existing OriginalObject within WSRR is
updated. The update method is passed references to the object in its current
state (oldObject) and its new state (newObject) in order to perform the required
validation tasks. The validator is able to modify the new state (newObject) of the
object to ensure that it conforms with the relevant governance policies that are in
place before it returns from the update method.
The update method must return a ServiceRegistryStatus object to indicate
whether the validation process succeeded or failed. If the update method returns
a SUCCESS or WARNING return code in the ServiceRegistryStatus object,
WSRR will persist the changes to the OriginalObject.
If the update method returns an ERROR return code in the
ServiceRegistryStatus object, WSRR will throw a
ServiceRegistryValidationException from the invoked WSRR API method and
the changes to the OriginalObject will not be persisted to WSRR.
200
Delete method
The delete method is invoked before an existing OriginalObject within WSRR is
deleted. The delete method is passed a reference to the object that is about to be
deleted in order to perform the required validation tasks. For example, it may be
necessary to ensure that the object to be deleted is not the target of any
relationships that have been defined on other objects within WSRR.
The delete method must return a ServiceRegistryStatus object to indicate
whether the validation process succeeded or failed. If the delete method returns
a SUCCESS or WARNING return code in the ServiceRegistryStatus object,
WSRR will delete the OriginalObject.
If the delete method returns an ERROR return code in the
ServiceRegistryStatus object, WSRR will throw a
ServiceRegistryValidationException from the invoked WSRR API method and
the OriginalObject will not be deleted from WSRR.
Transition method
The transition method is invoked before a governed object, or governed object
collection, is transitioned to a new governance lifecycle state. The transition
method is passed a reference to the object whose governance lifecycle state is
being changed and the transition that is being performed. The validator is able to
modify the governed object, or governed object collection, to ensure that it
conforms with the relevant governance policies that are in place before it returns
from the transition method.
Note: If the target of the transition is a governed object collection then the
OriginalObject passed to the transition method is the root object of the
governed object collection.
The transition method must return a ServiceRegistryStatus object to indicate
whether the validation process succeeded or failed. If the transition method
returns a SUCCESS or WARNING return code in the ServiceRegistryStatus
object, WSRR will modify the governance lifecycle state of the specified
OriginalObject.
If the transition method returns an ERROR return code in the
ServiceRegistryStatus object, WSRR will throw a
ServiceRegistryValidationException from the transition method that was
invoked on the WSRR Governance API and the governance lifecycle state of the
OriginalObject will not be modified within WSRR.
201
Validate method
The validate method is invoked as the result of an explicit call to the validate
method on the WSRR Governance API. The validate method is passed a
reference to the governed object, or governed object collection, that is to be
validated.
The validate method must return a ServiceRegistryStatus object to indicate
whether the validation process succeeded or failed. If the validate method
returns a SUCCESS or WARNING return code in the ServiceRegistryStatus
object, WSRR considers the validation to be a success and processing within the
WSRR client application continues as normal.
If the transition method returns an ERROR return code in the
ServiceRegistryStatus object, WSRR considers the validation to have failed
and will throw a ServiceRegistryValidationException from the validate method
that was invoked on the WSRR Governance API.
Note: Invoking the validate method on the WSRR Governance API will cause
the validate method on all of the registered governance validators to be
invoked for the governed object or governed object collection. However, the
validate method on the WSRR Governance API is simply a convenience
method that forces the validators to be invoked. Any modifications made by a
validator to the governed object, or governed object collect, will not be
persisted to WSRR.
202
remain set to the highest value it is given. For example, if the return code for an
instance of a ServiceRegistryStatus object is set to ERROR and then
subsequently set to SUCCESS or WARNING, the return code for that object will
remain at the ERROR level. If you need to reduce the level of the return code, you
must create a new instance of a ServiceRegistryStatus object and set the
required return code value.
ServiceRegistryStatus diagnostics
Validator methods should not throw exceptions to indicate that validation has
failed. However, a validator method may need to provide more information about
the failure of the validation process, particularly in situations where this process
is complex. If a validator method needs to provide more information about the
results of the validation process, it can add diagnostic objects or messages to the
ServiceRegistryStatus object that is returned using the methods shown in
Example 5-2.
Example 5-2 ServiceRegistryStatus diagnostic methods
5.4.2 Notifiers
Notification plugins are invoked at the end of calls to certain WSRR API methods.
They provide you with an opportunity to perform various post processing tasks
based on the result of the operation that was requested. For instance, there may
be a policy within your SOA environment that states that an audit trail must be
maintained for all interactions with WSRR.
Notifier interfaces
The notifier interfaces defined by the WSRR API are shown in Figure 5-23 on
page 204.
203
Notice that there are actually two notifier interfaces defined by the API. The
ServiceRegistryNotifier interface defines the methods that you should
implement if you require notification to occur as a result of invoking operations on
the WSRR Core API. The ServiceRegistryGovernanceNotifier interface
extends the ServiceRegistryNotifier interface and defines additional methods
that you should implement if you require notification to occur as a result of
invoking operations on the WSRR Governance API.
Note: The methods that are defined by the
ServiceRegistryGovernanceNotifier interface are only invoked for objects
that are currently part of a governed lifecycle. That is, they will only be invoked
on a governance validator as a result of invoking a WSRR Governance API
method on a governed object.
Create method
The create method is invoked after an instance of an OriginalObject has been
created in WSRR, or after an attempt to create an instance of an OriginalObject
has failed. The create method is passed the following parameters:
A reference to the object that was created, or whose creation failed.
A boolean success flag that indicates whether the create method succeeded
or failed. True indicates that the object was created successfully. False
indicates that the creation of the object failed.
204
An exception parameter that indicates the cause of the failure if the creation of
the object failed. The value of this parameter will be null if the creation of the
object succeeded.
Update method
The update method is invoked after an object stored in WSRR has been
updated, or after an attempt to update an object in WSRR has failed. The update
method is passed the following parameters:
A reference to the original state of the object that was updated, or whose
update failed.
A reference to the new state of the object that was updated, or whose update
failed.
A boolean success flag that indicates whether the update method succeeded
or failed. True indicates that the object was updated successfully. False
indicates that the update of the object failed.
An exception parameter that indicates the cause of the failure if the update of
the object failed. The value of this parameter will be null if the update of the
object succeeded.
Note: The type of the oldObject and newObject parameters that are passed to
this method is BaseObject. This means that the update method on a notifier
can be invoked when any type of object within WSRR is updated, not just
OriginalObjects.
Delete method
The delete method is invoked after an instance of an OriginalObject has been
deleted from WSRR, or after an attempt to delete an instance of an
OriginalObject has failed. The delete method is passed the following
parameters:
A reference to the object that was deleted, or whose deletion failed.
A boolean success flag that indicates whether the delete method succeeded
or failed. True indicates that the object was deleted successfully. False
indicates that the deletion of the object failed.
An exception parameter that indicates the cause of the failure if the deletion of
the object failed. The value of this parameter will be null if the deletion of the
object succeeded.
Transition method
The transition method is invoked after a governed object, or governed object
collection, has been transitioned to a new governance lifecycle state, or after an
205
attempt to transition to a new governance lifecycle state has failed. The transition
method is passed the following parameters:
The URI of the transition that was performed or failed.
A reference to the original state of the governed object, or governed object
collection, whose governance lifecycle state was being transitioned, or whose
transition failed.
A reference to the new state of the governed object, or governed object
collection, whose governance lifecycle state was being transitioned, or whose
transition failed.
A boolean success flag that indicates whether the transition method
succeeded or failed. True indicates that the governance lifecycle state of the
governed object, or governed object collection, was modified successfully.
False indicates that the transition failed.
An exception parameter that indicates the cause of the failure if the transition
of the governed object, or governed object collection, failed. The value of this
parameter will be null if the transition of the governed object, or governed
object collection, succeeded.
Note: If the target of the transition is a governed object collection then the
OriginalObject passed to the transition method is the root object of the
governed object collection.
206
Configuration Name
Configuration type
System
configuration
Validator
ValidationProperties
PLUGIN_PROPERTIES
true
Notifier
NotificationProperties
PLUGIN_PROPERTIES
true
207
Description
validators
validators.<OBJECT_TYPE>
WSDLDocument
XSDDocument
PolicyDocument
XMLDocument
GenericObject
validators.classification.<CLASSIFICATION>
governanceValidators
Note: Due to the limitations of the Java properties file, any classification URI
specified as part of a key within the file must not contain any : (colon)
characters. These should simply be omitted from any classification URI
specified.
The values specified within the configuration properties file must be a comma
separated list of fully qualified class names for the required validation plugins. As
discussed in 5.4.3, Packaging plugins on page 206, the implementation classes
208
for any validation plugins that are specified in the configuration properties file
must be made available to WSRR on the classpath at runtime.
The default configuration properties file for validation plugins that is loaded into
WSRR during the installation process is shown in Example 5-3.
Example 5-3 Default configuration properties file for validation plugins
209
Validator chains
For any given call to the WSRR API, several validators may need to be invoked to
enforce various aspects of the governance policies defined within your SOA
environment. WSRR allows multiple validators to be configured for any given
type of object. This enables you to implement each validator such that it enforces
just a single aspect of your overall governance policy. Combinations of validators
can then be deployed and configured to WSRR to build up the overall
governance policy that is required in your SOA environment.
When a call is made to one of the relevant WSRR API methods at runtime,
WSRR determines which validators need to be invoked. Using the information
contained within the configuration properties file for validation plugins, WSRR
builds a list of the applicable validators and then invokes the relevant method on
each validator in turn. The list of validators that need to be invoked for a specific
API method call is known as a validator chain.
The order in which the validators are added to the validator chain is as follows:
1. If the target of the WSRR API method call is a governed object, any
governance validators are added to the validator chain.
2. General validators.
3. Classification specific validators.
4. Object type specific validators
If multiple validators are listed against one of the relevant keys in the
configuration properties file, these validators are added to the validator chain in
the order in which they are listed.
It is valid for the same validator to appear several times in the configuration
properties file for validation plugins. In this situation, the same plugin may appear
more than once in the validator chain. If this occurs, WSRR will only invoke the
validator in question once, at the earliest opportunity.
If any of the validators in the chain return a ServiceRegistryStatus object that
indicates that the validation failed, WSRR will not invoke the remaining validators
in the chain. More importantly, the WSRR API implementation module will not be
invoked for the relevant method. In this situation, WSRR will invoke any
registered notifiers that are relevant for the method, indicating to each notifier
that the operation failed using the success flag. Once all of the relevant notifiers
have been invoked a ServiceRegistryValidationException is returned to the
210
client. The invocation sequence for a single validator that fails validation, and a
single notifier is shown in Figure 5-24.
Note: Unlike validators, notifiers are not able to affect the execution of a
WSRR API method. They are simply notified of the result of a WSRR API
method call, giving them opportunity to perform any required post-processing
tasks.
Description
notifiers
211
Description
notifiers.<OBJECT_TYPE>
WSDLDocument
XSDDocument
PolicyDocument
XMLDocument
GenericObject
notifiers.classification.<CLASSIFICATION>
governanceNotifiers
Note: Due to the limitations of the Java properties file, any classification URI
specified as part of a key within the file must not contain any : (colon)
characters. These should simply be omitted from any classification URI
specified.
The values specified within the configuration properties file must be a comma
separated list of fully qualified class names for the required notification plugins.
As discussed in 5.4.3, Packaging plugins on page 206, the implementation
classes for any notification plugins that are specified in the configuration
properties file must be made available to WSRR on the classpath at runtime.
The default configuration properties file for notification plugins that is loaded into
WSRR during the installation process is shown in Example 5-5.
Example 5-5 Default configuration properties file for notification plugins
212
As you can see, this configuration properties file defines a single default
notification plugin, as follows:
com.ibm.sr.api.ServiceRegistryNotifierJMS
This notification plugin provides support for publishing notification events to the
relevant JMS topics used by WSRR.
Note: The ServiceRegistryNotifierJMS plugin is a system plugin that is
required by WSRR at runtime. This notifier should not be removed when you
are modifying the configuration properties file for notification plugins.
Example 5-6 provides an example of how the configuration properties file for
notification plugins can be updated to include two additional notifiers. Notice that
the com.ibm.itso.plugins.ITSOAuditNotifier plugin has been added to the list
of the plugins for the notifiers key. Also, the
com.ibm.itso.plugins.WSIComplianceNotifier has been added against the
notifiers.WSDLDocument key. This notifier will only be invoked when WSRR API
methods are invoked on objects of type WSDLDocument.
Example 5-6 Modified configuration properties file for notification plugins
213
5.5.1 Dependencies
When the impact analysis component in WSRR is traversing the relationships of
an object graph, the direction of the relationships between the objects in the
graph is extremely important. The impact analysis component categorizes these
relationships by the type of dependency that they define between objects in
WSRR. These are:
Outbound dependencies
Inbound dependencies
When you initiate impact analysis using either the Web user interface or the
governance API, you must specify which type of dependency you want to be
analyzed. The sections that follow described the different types of dependency
that can exist between objects in WSRR.
Outbound dependencies
An object, Object A, has an outbound dependency on another object, Object B, if
a modelled or user defined relationship exists from Object A to Object B. To put it
more simply, Object A has an outbound dependency on Object B if Object A
depends on Object B.
Using our simple object graph, shown in Figure 5-25 on page 215, the two
Service WSDL documents each have an outbound dependency on the
PortType WSDL document. The PortType WSDL document itself has an
outbound dependency on the XSD document.
214
XSD
PortType
WSDL
Service
WSDL
Service
WSDL
In order to determine the list of objects on which a specific object depends, you
must invoke the getOutboundDependencies() method on the governance API,
specifying the bsrUri of the object in question.
If you are using the Web user interface, you must navigate to the Impact
Analysis tab for the object in question and ensure that the Include entities this
entity depends on check box is checked, as shown in Figure 5-26 on page 216.
215
Figure 5-26 Retrieving outbound dependencies using the Web user interface
Inbound dependencies
An object, Object A, has an inbound dependency from another object, Object B,
if a modelled or user defined relationship exists from Object B to Object A. To put
it more simply, Object A has an inbound dependency from Object B if Object B
depends on Object A.
Once again, using the simple object graph, shown in Figure 5-25 on page 215,
the XSD document has an inbound dependency from the PortType WSDL
document and the PortType WSDL document has two inbound dependencies,
one from each of the Service WSDL documents.
In order to determine the list of objects that depend on a specific object, you must
invoke the getInboundDependencies() method on the governance API,
specifying the bsrUri of the object in question.
If you are using the Web user interface, you must navigate to the Impact
Analysis tab for the object in question and ensure that the Include entities that
depend on this entity check box is checked, as shown in Figure 5-27 on
page 217.
216
Figure 5-27 Retrieving inbound dependencies using the Web user interface
Dependency depth
It is possible to restrict the extent to which the impact analysis component
traverses the object graph by specifying the depth of the analysis. In the context
of the impact analysis, the depth refers to the number of relationships that need
to be been traversed in order to navigate from the object on which impact
analysis is being performed, to any other object in the object graph. When
traversing the object graph, the impact analysis component stops analyzing a
given branch once the specified depth has been reached for that branch.
Specifying a suitable value for the depth is important when performing impact
analysis, since each object that is found when traversing a relationship is itself
analyzed for dependencies. Specifying a depth that is too small could lead to
important objects further down the object graph not being returned in the
dependency list. Specifying a depth that is too large could lead to a huge list of
dependent objects being returned, making it difficult to identify the most
important dependencies.
A value for the depth can be specified on both the getOutboundDependencies()
and getInboundDependencies() method on the governance API and also on the
217
Web user interface, using the Dependency depth field on the Impact Analysis
tab, as shown in Figure 5-28.
Figure 5-28 Specifying impact analysis depth using the Web user interface
218
and several derived objects are created to represent the elements contained
within the document. Each of the derived objects has a relationship named
document that references the WSDLDocument object from which it was parsed. This
is shown in Figure 5-29.
Derived Objects
WSDLPortType
WSDLOperation
Physical Document
document
WSDL
WSDLMessage
WSDLPart
WSDLMessage
WSDLPart
WSDLPart
219
Note: When performing impact analysis, the relationships that you specify do
not need to exist on the root object. Each object that is discovered during
impact analysis will itself be assessed to determine if it possesses any of the
modelled or user defined relationships that have been specified. If it does,
then these relationships are traversed and the objects that are discovered are
assessed, and so on until the specified depth is reached.
If the object does not contain any of the specified modelled or user defined
relationships the impact analysis component is unable to traverse the relevant
branch of the object graph any further and the object in question is considered
to be a leaf node.
The list of modelled relationships that should be traversed when performing
impact analysis is specified using the modelledRelationships parameter of the
the getOutboundDependencies() or getInboundDependencies() method on the
governance API. This parameter must contain the list of modelled relationship
names. If you are using the Web user interface, you can specify the modelled
relationships to be traversed by selecting them in the Built-in relationships list
box on the Impact Analysis tab, as shown Figure 5-30 on page 221.
220
Common relationships
All of the types defined by the information model in WSRR are an extension of
the BaseObject type. As a consequence, all of the object types in WSRR share
some common relationships that can be specified when performing impact
analysis. These are described in Table 5-9 on page 222.
221
Table 5-9 Common modelled relationships that can be traversed during impact analysis
Relationship name
Dependency type
Description
SDO:
classificationURIs
Outbound
UI:
Entity Reference
to classification
SDO:
governedObjects
UI:
Relationship to
object in the same
governance group
Inbound
Governance
Record
governedObjects
classificationURIs
BaseObject
Ontology
System
Figure 5-31 Common modelled relationships that can be traversed during impact
analysis
222
OriginalObject relationships
All of the physical document type objects defined by the information model in
WSRR ultimately extend the OriginalObject type. The GenericObject type also
extends OriginalObject. As a consequence, all of the physical document types
and the GenericObject type share some common relationships that can be
specified when performing impact analysis. These are described in Table 5-10.
Table 5-10 Modelled relationships that can be traversed for OriginalObjects during impact analysis
Relationship name
Dependency type
Description
SDO:
predecessors
Outbound/Inbound
UI:
Entity
Relationship to
predecessor
223
Relationship name
Dependency type
Description
SDO:
template
Outbound
UI:
Non-derived entity
reference to its
template
Original
Original
Object
Original
Object
Object
predecessors
Original
Object
template
Complex
Type
Definition
Figure 5-32 Modelled relationships that can be traversed for OriginalObjects during
impact analysis
Document relationships
All of the physical document types objects defined by the information model in
WSRR extend the Document type. As a consequence, all of the physical
document types share a common relationships that can be specified when
performing impact analysis. These are described in Table 5-11.
Table 5-11 Modelled relationships that can be traversed for Document objects during impact analysis
Relationship name
Dependency type
Description
SDO:
document
Inbound
UI:
Derived entity
reference to its
source document
224
Logical
Object
document
Document
Figure 5-33 Modelled relationships that can be traversed for Document objects during
impact analysis
WSDLDocument relationships
The modelled relationships that can be specified when performing impact
analysis on WSDLDocument objects are described in Table 5-12.
Table 5-12 Modelled relationships that can be traversed for WSDLDocuments during impact analysis
Relationship name
Dependency type
Description
SDO:
importedWSDLs
Outbound/Inbound
UI:
WSDL document
to imported
WSDL document
225
Relationship name
Dependency type
Description
SDO:
importedXSDs
Outbound
UI:
WSDL or XSD
document to
imported XSD
document
SDO:
includedXSDs
UI:
WSDL or XSD
document to
included XSD
document
Outbound
SDO:
redefinedXSDs
UI:
WSDL or XSD
document to
redefined XSD
document
Outbound
226
WSDL
WSDL
WSDL
importedWSDLs
importedXSDs
includedXSDs
redefinedXSDs
WSDL
XSD
XSD
XSD
Figure 5-34 Modelled relationships that can be traversed for WSDLDocuments during impact analysis
XSDDocument relationships
The modelled relationships that can be specified when performing impact
analysis on XSDDocument objects are described in Table 5-13.
Table 5-13 Modelled relationships that can be traversed for XSDDocuments during impact analysis
Relationship name
Dependency type
Description
SDO:
importedXSDs
Outbound/Inbound
UI:
WSDL or XSD
document to
imported XSD
document
227
Relationship name
Dependency type
Description
SDO:
includedXSDs
Outbound/Inbound
UI:
WSDL or XSD
document to
included XSD
document
SDO:
redefinedXSDs
UI:
WSDL or XSD
document to
redefined XSD
document
Outbound/Inbound
228
importedXSDs
includedXSDs
redefinedXSDs
WSDL
WSDL
WSDL
XSD
importedXSDs
includedXSDs
redefinedXSDs
XSD
XSD
XSD
Figure 5-35 Modelled relationships that can be traversed for XSDDocuments during impact analysis
LogicalObject relationships
All of the derived object types defined by the information model in WSRR
ultimately extend the LogicalObject type. As a consequence, all of the derived
object types share a common relationship that can be specified when performing
impact analysis. This is described in Table 5-14.
Table 5-14 Modelled relationships that can be traversed for LogicalObjects during impact analysis
Relationship name
Dependency type
Description
SDO:
document
Outbound
UI:
Derived entity
reference to its
source document
Logical
Object
document
Document
Figure 5-36 Modelled relationships that can be traversed for LogicalObjects during
impact analysis
229
WSDLPortType relationships
The modelled relationships that can be specified when performing impact
analysis on WSDLPortType objects are described in Table 5-15.
Table 5-15 Modelled relationships that can be traversed for WSDLPortTypes during impact analysis
Relationship name
Dependency type
Description
SDO:
operations
Outbound
UI:
SDO:
portType
UI:
WSDL Binding to
WSDL Port Type
230
Inbound
portType
WSDL
Binding
WSDL
Port
Type
operations
WSDL
WSDL
Operation
WSDL
Operation
Operation
Figure 5-37 Modelled relationships that can be traversed for WSDLPortTypes during impact analysis
WSDLOperation relationships
The modelled relationships that can be specified when performing impact
analysis on WSDLOperation objects are described in Table 5-16.
Table 5-16 Modelled relationships that can be traversed for WSDLOperations during impact analysis
Relationship name
Dependency type
Description
SDO:
inputMessage
Outbound
UI:
WSDL Operation
to WSDL Input
Message
231
Relationship name
Dependency type
Description
SDO:
outputMessage
Outbound
UI:
WSDL Operation
to WSDL Output
Message
SDO:
faults
Outbound
UI:
WSDL Operation
to WSDL Fault
Message
SDO:
operations
Inbound
UI:
WSDL
Port
Type
operations
WSDL
Operation
inputMessage
outputMessage
faults
WSDL
WSDL
Message
WSDL
Message
Message
Figure 5-38 Modelled relationships that can be traversed for WSDLOperations during impact analysis
232
WSDLMessage relationships
The modelled relationships that can be specified when performing impact
analysis on WSDLMessage objects are described in Table 5-17.
Table 5-17 Modelled relationships that can be traversed for WSDLMessages during impact analysis
Relationship name
Dependency type
Description
SDO:
messageParts
Outbound
UI:
WSDL Message
to WSDL Part
SDO:
inputMessage
UI:
WSDL Operation
to WSDL Input
Message
SDO:
outputMessage
UI:
WSDL Operation
to WSDL Output
Message
SDO:
faults
UI:
WSDL Operation
to WSDL Fault
Message
Inbound
Inbound
Inbound
233
inputMessage
outputMessage
faults
WSDL
Operation
WSDL
Message
messageParts
WSDL
WSDL
Part
WSDL
Part
Part
Figure 5-39 Modelled relationships that can be traversed for WSDLMessages during impact analysis
WSDLPart relationships
The modelled relationships that can be specified when performing impact
analysis on WSDLPart objects are described in Table 5-18.
Table 5-18 Modelled relationships that can be traversed for WSDLParts during impact analysis
Relationship name
Dependency type
Description
SDO:
xsdType
Outbound
UI:
WSDL Part to
XSD Type
SDO:
xsdElement
UI:
WSDL Part to
XSD Element
Declaration
Outbound
234
Relationship name
Dependency type
Description
SDO:
messageParts
Inbound
UI:
WSDL Message
to WSDL Part
xsdType
WSDL
Message
messageParts
XSD
Type
WSDL
Part
xsdElement
Element
Declaration
Figure 5-40 Modelled relationships that can be traversed for WSDLParts during impact
analysis
WSDLBinding relationships
The modelled relationships that can be specified when performing impact
analysis on WSDLBinding objects are described in Table 5-19 on page 236.
235
Table 5-19 Modelled relationships that can be traversed for WSDLBindings during impact analysis
Relationship name
Dependency type
Description
SDO:
portType
Outbound
UI:
WSDL Binding to
WSDL Port Type
SDO:
SOAPBinding
UI:
WSDL Binding to
SOAP Binding
Outbound
SDO:
binding
UI:
WSDL Port to
WSDL Binding
236
Inbound
SOAPBinding
portType
WSDL
Port
Type
SOAP
Binding
WSDL
Binding
binding
WSDL
Port
Figure 5-41 Modelled relationships that can be traversed for WSDLBindings during
impact analysis
SOAPBinding relationships
The modelled relationships that can be specified when performing impact
analysis on SOAPBinding objects are described in Table 5-20.
Table 5-20 Modelled relationships that can be traversed for SOAPBindings during impact analysis
Relationship name
Dependency type
Description
SDO:
SOAPBinding
Inbound
UI:
WSDL Binding to
SOAP Binding
237
WSDL
Binding
SOAPBinding
SOAP
Binding
Figure 5-42 Modelled relationships that can be traversed for SOAPBindings during
impact analysis
WSDLService relationships
The modelled relationships that can be specified when performing impact
analysis on WSDLService objects are described in Table 5-21.
Table 5-21 Modelled relationships that can be traversed for WSDLServices during impact analysis
Relationship name
Dependency type
Description
SDO:
ports
Outbound
UI:
WSDL Service to
WSDL Port
238
WSDL
Service
WSDL
WSDL
Port
WSDL
Port
Port
ports
Figure 5-43 Modelled relationships that can be traversed for WSDLServices during
impact analysis
WSDLPort relationships
The modelled relationships that can be specified when performing impact
analysis on WSDLPort objects are described in Table 5-22.
Table 5-22 Modelled relationships that can be traversed for WSDLPorts during impact analysis
Relationship name
Dependency type
Description
SDO:
SOAPAddress
Outbound
UI:
WSDL Port to
SOAP Address
239
Relationship name
Dependency type
Description
SDO:
binding
Outbound
UI:
WSDL Port to
WSDL Binding
SDO:
ports
Inbound
UI:
WSDL Service to
WSDL Port
SOAPAddress
WSDL
Service
ports
SOAP
Address
WSDL
Port
binding
WSDL
Binding
Figure 5-44 Modelled relationships that can be traversed for WSDLPorts during impact
analysis
240
SOAPAddress relationships
The modelled relationships that can be specified when performing impact
analysis on SOAPAddress objects are described in Table 5-23.
Table 5-23 Modelled relationships that can be traversed for SOAPAddresses during impact analysis
Relationship name
Dependency type
Description
SDO:
SOAPAddress
Inbound
UI:
WSDL Port to
SOAP Address
WSDL
Port
SOAPAddress
SOAP
Address
Figure 5-45 Modelled relationships that can be traversed for SOAPAddresses during
impact analysis
ElementDeclaration relationships
The modelled relationships that can be specified when performing impact
analysis on ElementDeclaration objects are described in Table 5-24.
Table 5-24 Modelled relationships that can be traversed for ElementDeclarations during impact analysis
Relationship name
Dependency type
Description
SDO:
xsdElement
Inbound
UI:
WSDL Part to
XSD Element
Declaration
241
WSDL
Part
xsdElement
Element
Declaration
Figure 5-46 Modelled relationships that can be traversed for ElementDeclarations during
impact analysis
ComplexTypeDefinition relationships
The modelled relationships that can be specified when performing impact
analysis on ComplexTypeDefinition objects are described in Table 5-24 on
page 241.
Table 5-25 Modelled relationships that can be traversed for ComplexTypeDefinitions during impact analysis
Relationship name
Dependency type
Description
SDO:
localAttributes
Outbound
UI:
XSD complex
type reference to
a local attribute
SDO:
template
UI:
Non-derived entity
reference to its
template
Inbound
242
Original
Object
template
Complex
Type
Definition
localAttributes
Local
Attribute
243
244
Part 3
Part
Planning and
installing WSRR
245
246
Chapter 6.
Possible topologies
This chapter describes some possible installation topologies, such as which
version of IBM WebSphere Application Server to use and where to locate the
databases.
This chapter contains the following:
6.1, WSRR requirements on page 248
6.2, Database topologies on page 250
6.3, WebSphere Application Server topologies on page 251
247
248
Security
Performance
Throughput
Scalability
Availability
Maintainability
Session state
249
Physical Server
Database
Server
WSRR
xmeta1
WebSphere
Application
Server
SOR
250
This configuration requires multiple machines but each machine does not need
to be as powerful as would be necessary were the database local. The network
connection between the two machines should be as fast as possible and involve
as few network switches, hubs, and so on as possible. An ideal setup would have
both machines located in the same rack and on the same network subnet.
Physical Server 1
Physical Server 2
Database
Server
WSRR
xmeta1
WebSphere
Application
Server
SOR
251
252
Chapter 7.
253
254
6. Check the path to your WebSphere installation is correct and then click Next.
7. Ensure Install maintenance package. is selected and click Next.
8. Ensure the path to the package to install ends in
6.0-WS-WAS-WinX32-RP0000002.pak and then click Next.
9. The refresh pack update needs to install a new Java runtime, however the
update installer is running using the current one, so it needs to copy the new
JDK to a temporary directory and then relaunch. After reading the
explanation of these steps in the panel click Next.
10.Once the copy has completed, click Relaunch.
11.When the wizard restarts ensure Install maintenance package is selected
and click Next.
12.The path to the package should not have changed and so click Next.
13.The wizard will now detail what it is about to do, namely to install RP6020 WebSphere Application Server 6.0.2.0. Check these details are correct and
then click Next.
14.Once it is complete, click Finish.
255
10.The wizard will now detail what it is about to do, namely to install FP60211 WebSphere Application Server 6.0.2.11. Check these details are correct and
then click Next.
11.Once it is complete click Finish.
12.Delete the <WAS_HOME>\updateinstaller directory (e.g. C:\Program
Files\IBM\WebSphere\AppServer\updateinstaller)
13.Open the 6.0.2-WS-WASJavaSDK-WinX32-FP00000011 directory on the CD
14.Copy the updateinstaller directory to your WebSphere Application Server
directory (e.g. C:\Program Files\IBM\WebSphere\AppServer)
15.Double-click the update.exe program in your freshly copied directory (e.g.
C:\Program Files\IBM\WebSphere\AppServer\updateinstaller\update.exe)
16.Click Next on the welcome panel
17.Check the path to your WebSphere installation is correct and then click Next.
18.Ensure Install maintenance package. is selected and click Next.
19.Ensure the path to the package to install ends in
6.0.2-WS-WASJavaSDK-WinX32-FP00000011.pak and then click Next.
20.The fix pack update needs to install a new Java runtime, however the update
installer is running using the current one, so it needs to copy the new JDK to a
temporary directory and then relaunch. After reading the explanation of these
steps in the panel click Next.
21.Once the copy has completed click Relaunch.
22.When the wizard restarts ensure Install maintenance package is selected
and click Next.
23.The path to the package should not have changed and so click Next.
24.The wizard will now detail what it is about to do, namely to install
WASJAVASDKFP60211 - Software Developer Kit V6.0.2.11. Check these
details are correct and then click Next.
25.Once it is complete click Finish.
256
Follow these steps to install DB2 Universal Database Enterprise Server Edition
8.2.5:
1. Insert the DB2 Universal Database Enterprise Server Edition 8.2 fixpack 5
CD.
2. Run setup.exe
3. Select Install Product from the launchpad
4. Click Next after confirming that you want to install DB2 Universal Database
Enterprise Server Edition.
5. The DB2 install wizard will now start. Click Next on the welcome window.
6. Select the I accept option and then click Next on the license panel
7. Select Typical installation type and leave the additional function check boxes
unselected, then click Next.
8. Ensure the Install DB2 Enterprise Server Edition on this computer box is
checked and the Save your settings in a response file box is unchecked.
Click Next.
9. Select the option Single-partition database environment and click Next
10.Select the directory to install DB2 in to, e.g. C:\Program Files\IBM\SQLLIB
and then click Next.
11.Enter the following values for the DB2 Admin user details:
Domain: leave this blank if you do not have a domain
User name: Change this value if you want to use something other than
db2admin
Password: Enter a password for the userid
Confirm password: Enter the password again
Ensure the Use the same user name and password for the remaining DB2
services box is checked and then click Next.
12.Leave the Administration contact list as Local and leave Enable notification
deselected and then click Next.
13.Click OK in the notification warning window that appears.
14.Click Next in the Configuring DB2 instances panel
15.Check the Do not prepare the DB2 tools catalog option and click Next.
16.When asked to specify a contact for health monitoring select Defer the task
until after installation is complete and click Next.
17.Check the settings for this install are correct and then click Install.
18.Once the install has completed click Finish.
257
19.Click Exit First Steps when the First Steps Launchpad appears.
258
259
4. Select the I accept option and then click Next on the license panel as in
Figure 7-3
260
261
6. Confirm the install settings are correct and then click Install as in Figure 7-5.
262
7. The installer will now install the files as in Figure 7-6. Once complete it will tell
you that you need to run the deployment scripts to install the enterprise
application into WebSphere and to create the databases (See Figure 7-7 on
page 264. We will do that in the next section, 7.6, Deploy WebSphere
Service Registry and Repository on page 265.). Click Next.
263
264
265
Usage: installall.bat
-was-password was-password
-db-password db-password
[-was-user was-user]
[-administrator-user administrator-user-name]
[-administrator-group administrator-group]
[-user-user user-role-user-name]
[-user-group user-role-group]
[-was-home C:\IBM\WebSphere\AppServer]
[-was-profile default]
[-was-server server1]
[-soap-port 8880]
[-bootstrap-port 2809]
[-db-home C:\IBM\SQLLIB]
[-db-type db2_8]
[-db-user db-user]
[-db-port 50000]
[-db-hostname localhost]
[-db-tsdir C:\DB2TS]
[-skip-dbcreate true or false]
266
Parameter
Description
DB_TYPE
DB_USER
Parameter
Description
DB_HOME
DB_HOSTNAME
DB_PORT
DB2TSDIR
SKIPDBCREATE
WAS_HOME
WAS_PROFILE
WASSRVR
WASPORT
BOOTSTRAPPORT
WAS_ADMIN_USER
ADMINISTRATOR_USER
ADMINISTRATOR_GROUP
USER_USER
The user you want added to the user role. This can also
be set to NONE or ALL_AUTHENTICATED.
USER_GROUP
267
Parameter
Description
LOGDIR
The directory to put the install log files in. Normally set
to be %SR_INSTALL% which will equate to be the
<WSRR_HOME>\install directory.
Table 7-2 shows the extra parameters that can be found in setenv.sh when
installing on UNIX but that are not used on Windows.
Table 7-2 UNIX only extra WSRR deployment parameters
Parameter
Description
DB_INSTID
DB2INST
ORACLEPATH
ORAPORT
ORAUSER
If any values in your environment file are incorrect then it is likely the deployment
will fail.
For more information about using the deployment scripts, consult the WSRR
Information Center:
http://publib.boulder.ibm.com/infocenter/sr/v6r0/topic/com.ibm.sr.do
c/twsr_installn15.html
Note: A common source of problems with the deployment stage is errors in
the parameters specified in setenv. Ensure all parameters used are
appropriate for your environment. Take extra care over the WASPORT and
BOOTSTRAPPORT values as there is no validation for these values.
Example 7-2 on page 269 shows the environment file used in our deployment.
268
Note: Even if you are not using security in WebSphere Application Server you
must still provide values for the WAS_ADMIN_USER variable in setenv.bat
and the was-password parameter on the installall.bat command line. It is
easiest to just provide the username and password for a local system
administrator.
If WebSphere security is off the install does seem to proceed correctly even if
the username and password specified are not actually valid, values just have
to be provided for them.
@rem begin_generated_IBM_copyright_prolog
@rem
@rem
@rem
@rem
@rem
@rem
@rem end_generated_IBM_copyright_prolog
@echo off
set SR_INSTALL=%~dps0
set XMETA_HOME=%~dps0..\xmeta
REM -------- DB Installation Information -------REM Database type
REM possible values: db2_8
if "%DB_TYPE%" == "" set DB_TYPE=db2_8
REM Database username
REM Please do not put quotes around the user ID
if "" == "%DB_USER%" set DB_USER=xmeta
REM The database password is not stored in this file for security reasons
REM Database install directory
REM Please do not put quotes around the directory path
if "%DB_HOME%" == "" set DB_HOME=c:\Program Files\IBM\SQLLIB
REM DB hostname
REM if you set this to anything other than localhost you must create the database
REM manually first and then specify "-skip-dbcreate true"
269
270
------------------------------------------------------------------------ Users and groups that should be granted each of the roles
-- defined by the service registry.
-- Each xxx_USER variable can be set to one of:
-- {NONE, EVERYONE, ALL_AUTHENTICATED, <any-valid-user-name>}
-- if using LDAP, the user name must be the short version of the user name
-- Each xxx_GROUP variable can be set to the name of a group or nothing.
-- if using LDAP, the group name must be the fully qualified group name
--
------------------------------------------------------------------------ Setup the ANT PATHS so we can use ant from WAS for installation -SR_ANTHOME=%XMETA_HOME%\lib
SR_ANTCP=%SR_ANTHOME%\ant.jar;%SR_ANTHOME%\ant-launcher.jar
-----------------------------------------------------------------------
271
272
6. You should then get output similar to that shown in Figure 7-11.
If for any reason the deployment failed then you can look in the two log files
mentioned in the output, for possible information about why it failed.
Otherwise please contact your IBM Support representative.
7. WSRR should now be deployed and you should be able to verify the
installation was successful by pointing a Web browser at the WSRR user
interface:
http://<system-host-name>:9080/ServiceRegistry
Or, if you have WebSphere security turned on, point to:
https://<system-host-name>:9443/ServiceRegistry
You should see something similar to that shown in Figure 7-12 on page 274.
Note: The port number in the above URLs might be different for your
environment.
273
7.6.1 Security
In most installations it is desirable to limit access to WSRR. This is done by
turning on WebSphere security. It is not within the scope of this book to cover
how to do that, but it is documented in the WebSphere Information Center:
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/topic/com.ibm.
websphere.base.doc/info/aes/ae/tsec_csec.html
For the purposes of this book we have turned on WebSphere Global Security
and we are using local operating system authentication. Therefore we have
created a local user on the WSRR installation machine called wasadmin. We did
not turn on Java2 Security because it is not necessary for this book. See the
274
following Web page in the WSRR Information Center for more information about
using WSRR with Java2 Security:
http://publib.boulder.ibm.com/infocenter/sr/v6r0/topic/com.ibm.sr.do
c/cwsr_planning_install16.html
275
cd C:\IBM\Program Files\WebSphereServiceRegistry\install\xmeta
8. Run createdb_db2.bat as in Example 7-5.
Example 7-5 WSRR Create database command
cd C:\IBM\Program Files\WebSphereServiceRegistry\install
13.Run installall.bat as in Example 7-7.
Example 7-7 WSRR installall command
276
277
278
The port numbers in these URLs will need to be substituted for those
appropriate to your environment.
You should see something similar to that shown in Figure 7-12 on page 274.
279
280
Chapter 8.
Administering WSRR
This chapter describes how to administer WebSphere Service Registry and
Repository and the various interfaces that can be used.
This chapter contains the following:
8.1, Administration overview on page 282
8.2, WSRR configurations on page 283
8.3, Security considerations on page 285
8.4, Administering WSRR using wsadmin on page 285
8.5, Administering WSRR using JMX on page 292
8.6, Administering WSRR using the CLI on page 299
8.7, Ontology administration on page 307
8.8, Access control administration on page 309
8.9, Import/Export on page 311
8.10, Environment promotion on page 319
8.11, Administration scripts (wsadmin) on page 321
281
282
283
System indicator
A boolean flag which indicates if the configuration is a system configuration
(true) or a user-defined one (false). WSRR components may use this flag to
determine whether a configuration is required.
When a configuration is created, it is given a unique URI (within WSRR). Some
operations have signatures that take this URI as the configuration identifier, for
example updateConfiguration, retrieveConfiguration and deleteConfiguration. In
situations where you do not have this identifier available, operations often have a
signature that takes a name and configuration type, for example
updateConfiguration, retrieveConfiguration. To find out the identifier for a
configuration there is an operation that accepts a name and a configuration type.
Description
UI_PERSPECTIVE
UI perspective definition
UI_NAVIGATION_TREE
UI_VIEW_QUERY_SYSTEM
UI_VIEW_QUERY_USER_DEF
UI_DETAIL_VIEW
UI_COLLECTION_VIEW
SACL
XACML
EMAIL_TEMPLATE
PLUGIN_PROPERTIES
plugin properties
Note: If you are customizing the WSRR Web user interface, do not use the
UI_VIEW_QUERY_SYSTEM configuration type - use the
UI_VIEW_QUERY_USER_DEF configuration type with its
systemConfiguration flag set to false.
284
285
286
version of the ObjectName (See 8.4.2, Locating the WSRR MBean with
wsadmin on page 286):
wsadmin>$Help operations $objectNameString
This will then respond with a list of possible operations. All available operations
have been described in Table 8-2.
More information about the Admin MBean operations can be found in the MBean
reference documentation:
http://publib.boulder.ibm.com/infocenter/sr/v6r0/topic/com.ibm.sr.ja
vadoc.doc/WSRR_MBean.html
Table 8-2 Admin MBean operations
Method
Description
Parameters
loadConfiguration
loadConfiguration
loadConfiguration
updateConfiguration
updateConfiguration
id, content,
systemConfiguration
retrieveConfiguration
id
retrieveConfiguration
name, type,
systemConfiguration
retrieveAllConfigurationNames
type
deleteConfiguration
id
getConfigurationId
name, type
getConfigurationIds
type
createOntologySystem
content
287
Method
Description
Parameters
createOntologySystem
location
deleteOntologySystem
uri
importMetaData
xmlBytes
exportMetaData
uris
addRole
roleName
removeRole
roleName
addPrincipalToRole
principalSecurityName,
roleName
removePrincipalFromRole
principalSecurityName,
roleName
getRolesWithPermissions
None
removePermissionFromRole
permissionName,
roleName
removeAllRolePermissions
None
removeAllRoles
None
288
Method
Description
Parameters
addPermissionToRole
roleName, action,
permissionName,
permissionTarget
addPermissionToRole2
roleName,
permissionName
getPermissionsForRole
roleName
persistPolicy
None
persistRoleMappings
None
289
specifies each of the parameter types as string values, and the parameters are
the corresponding values, as Java objects.
As an example, the loadConfiguration operation with the signature that takes a
byte[] as the configuration content is used to illustrate how to invoke one of the
WSRR MBean operations to load a custom navigation tree for the WSRR Web
user interface, from an XML file called CustomNavTree.xml. The full signature of
the operation is as follows:
java.lang.String loadConfiguration(java.lang.String name,
java.lang.String type, byte[] content, boolean systemConfiguration)
The return type is the id of the configuration item in the registry. First, read the
configuration file into a byte[] as in Example 8-2:
Example 8-2 wsadmin - read configuration file into a byte array
set sigs
$sigs
$sigs
$sigs
$sigs
290
[java::new {java.lang.String[]} 4]
set 0 java.lang.String
set 1 java.lang.String
set 2 \[B
set 3 boolean
Note: The byte array in the signature must be specified in the Java shorthand
notation and the square bracket must be escaped with a backslash character.
Also note that the operation requires a boolean primitive, set in the signature
as 'boolean' but because the parameters must be specified as an Object[], a
java.lang.Boolean is passed.
Set the parameter values in the parameters array as in Example 8-6:
Example 8-6 wsadmin - set the parameter values
javax.management.MBeanException
com.ibm.serviceregistry.exception.admin.AdminException:
com.ibm.serviceregistry.exception.admin.AdminException: GSR0098E: A
291
ConfigItem with the same name and configuration type already exists in
the repository.
A limitation of wsadmin is that when an MBeanException is thrown, the wsadmin
environment throws a ScriptingException to the client with only the message of
the underlying exception, but has no way of retrieving the cause exception. There
are circumstances where you may get a
com.ibm.serviceregistry.exception.admin.AdminException indicating an
operation failed. For example, if you tried to load a configuration with an invalid
configuration type of UI_PERSECTIVE you would get:
Example 8-8 wsadmin - example invalid configuration type exception
292
ServiceRegistryRepositoryProxy.java constructors
There are three constructors available, depending on the way that the target
server is configured, whether global security is enabled, and which connector
type you want to use.
Use this constructor when global security is off and you want to use SOAP:
public ServiceRegistryRepositoryProxy(String server, String port,
String wasHome)
Use this constructor when WAS global security is enabled and you want to
use SOAP:
ServiceRegistryRepositoryProxy(String server, String port, String
wasHome, String userName, String userPassword, String
293
294
ACTION
the state of the MBean will be changed
INFO
the state of the MBean remains unchanged and will return information
ACTION_INFO
the state of the MBean will change and return some information
UNKNOWN
the impact of invoking the operation is not known
Invoke outputMBeanInterface method (verbose parameter is set to false). The
available methods can be found described in Table 8-2 on page 287. The
expected output of invoking outputMBeanInterface can be found in the WSRR
Information Center:
http://publib.boulder.ibm.com/infocenter/sr/v6r0/topic/com.ibm.sr.do
c/twsr_adminstn_adiministration21.html
8.5.2 Invoking WSRR MBean operations with the Java JMX client
As an example, the following code illustrates how to gather a list of the names of
all configurations in WSRR for a particular configuration type. The method to
invoke is retrieveAllConfigurationNames, with this signature:
public List retrieveAllConfigurationNames(String type)
The type parameter can be any String but as far as the administration component
is concerned, it must be one of the allowed configuration types. To ensure this,
use the ConfigurationType class and choose one of the types, in this case
UI_DETAIL_VIEW as shown in Example 8-9.
Example 8-9 JMX ConfigurationType example
List uiDetailViewNames =
wsrr.retrieveAllConfigurationNames(
ConfigurationType.UI_DETAIL_VIEW.toString());
System.out.println("UI detail view configurations:");
Iterator iterator = uiDetailViewNames.iterator();
while (iterator.hasNext()) {
String configurationName = (String) iterator.next();
System.out.println(configurationName);
}
295
The configuration names are returned as a List to the invoking class. Inspecting
the retrieveAllConfigurationNames method in the proxy class shows how the
parameters are prepared for invoking the MBean operation:
1. Specify the type of each parameters:
String[] signature = new String[] { String.class.getName() };
2. Place the parameters in an object array:
Object[] params = new Object[] { type };
3. Invoke the method by name and cast the returned object to the required type:
List names = (List) invoke("retrieveAllConfigurationNames",
signature, params);
4. Return the result:
return names;
The invoke method in the proxy is used by all other public methods to invoke the
actual MBean operation, using the AdminClient object, previously set up in the
constructor:
return adminClient.invoke(mBean, operation, params, signature);
This pattern for invoking MBean operations is the same regardless of whether
the client is using Java code, or scripts using wsadmin or the WSRR command
line interface.
InstanceNotFoundException
MBeanException
ReflectionException
ConnectorException
296
try {
List uiDetailViewNames =
wsrr.retrieveAllConfigurationNames(
ConfigurationType.UI_DETAIL_VIEW.toString());
System.out.println("UI detail view configurations:");
Iterator iterator = uiDetailViewNames.iterator();
while (iterator.hasNext()) {
String configurationName = (String) iterator.next();
System.out.println(configurationName);
}
} catch (MBeanException e) {
} catch (Exception e) {
e.printStackTrace();
}
To simplify the example, the InstanceNotFoundException, ReflectionException
and ConnectorException are caught in the last catch block and ignored.
To determine if the MBeanException contains an AdminException, extract the
cause exception as shown in Example 8-11:
Example 8-11 JMX - retrieve configuration names example extract cause exception
} catch (MBeanException e) {
if (e.getCause() != null &&
e.getCause() instanceof AdminException) {
AdminException ae = (AdminException) e.getCause();
}
} catch (Exception e) {
e.printStackTrace();
}
297
} catch (MBeanException e) {
if (e.getCause() != null &&
e.getCause() instanceof AdminException) {
AdminException ae = (AdminException) e.getCause();
System.out.println("Caught AdminException: ");
System.out.println("message: " + ae.getMessage());
System.out.println("explanation: " + ae.getExplanationText());
System.out.println("response: " + ae.getResponseText());
if (ae.getCause() != null &&
ae.getCause() instanceof AdminException) {
AdminException ce = (AdminException) ae.getCause();
System.out.println("AdminException cause: ");
System.out.println("message: " + ce.getMessage());
System.out.println("explanation: " + ce.getExplanationText());
System.out.println("response: " + ce.getResponseText());
}
}
} catch (Exception e) {
e.printStackTrace();
}
The example code outputs the messages using default locale of the system. The
methods getExplanationText, getResponseText are overloaded to take a Locale
object if you want the message in a particular language. There are other
methods available on the ServiceRegistryException class to retrieve the
message number, message severity, and the message without the prefix.
You can force an AdminException to be thrown by changing this line:
List uiDetailViewNames = wsrr.retrieveAllConfigurationNames(
ConfigurationType.UI_DETAIL_VIEW.toString());
to this, where the configuration type is invalid:
List uiDetailViewNames = wsrr.retrieveAllConfigurationNames(
"INVALID_DETAIL_VIEW");
This results in this output are shown in Example 8-13 on page 299.
298
Caught AdminException:
message: GSR0131E: Unable to retrieve all configuration names for
configuration type "INVALID_DETAIL_VIEW".
explanation: The configuration type may not be valid. The operation may
have failed because of a validation error or a system error. If there
is a cause exception, its message may offer more explanation.
response: Check the type is valid. Correct any validation errors caused
by invalid parameters, and check system configuration.
AdminException cause:
message: GSR0138E: The configuration type value "INVALID_DETAIL_VIEW"
is unknown.
explanation: The configuration type must be one of the values in the
ConfigurationType class.
response: Replace the value of the configuration type string with a
valid value.
299
300
java.security.auth.login.config
MBean connection configuration parameters include:
host
port
type (SOAP or RMI)
username (optional, may be supplied at runtime)
password (optional, may be supplied at runtime)
securityEnabled
javax.net.ssl.trustStore
javax.net.ssl.keyStore
javax.net.ssl.trustStorePassword
javax.net.ssl.keyStorePassword
You may designate an alias by prefixing the parameter names with the alias,
thus: AN_ALIAS.host = test21.location.ibm-itso.com
This makes it possible to store configuration information for several machines in
the same file. The following example (Example 8-14) shows a configuration for
two machines, an unsecured machine open and a secure machine secure.
(Note that line breaks have been inserted for readability refer to file for actual
format.)
Example 8-14 Example CLI configuration file
301
secure.host = 192.168.1.101
secure.port = 8880
secure.type = SOAP
secure.securityEnabled = true
secure.javax.net.ssl.trustStore =
C:/IBM/WebSphere/AppClient/etc/DummyClientTrustFile.jks
secure.javax.net.ssl.keyStore =
C:/IBM/WebSphere/AppClient/etc/DummyClientKeyFile.jks
secure.javax.net.ssl.trustStorePassword = WebAS
secure.javax.net.ssl.keyStorePassword = WebAS
Test connectivity
Once you have installed and configured the command line client it is a good idea
to test that it can connect properly to the WSRR server. The connectTest.py
script establishes and tests connections to each of the EJB beans and to the
MBean server.
To use it, run:
wsrrcli connectTest.py -a <configFile> \ -u <> -p <password>
For example:
WSRRCLI.bat scripts\connectTest.py a open c config\wsrrcli.conf
Or:
wsrrcli.sh scripts/connectTest.py a secure \ c config/wsrrcli.conf
-u username p passw0rd
Constructor detail
Example 8-15 and Example 8-16 on page 303 detail the two constructors.
Example 8-15 WSRRConnectionFactory constructor
302
Method detail
Example 8-17, Example 8-18 on page 304, Example 8-19 on page 304,
Example 8-20 on page 305 and Example 8-21 on page 305 show examples of
the available methods.
Example 8-17 getSessionConnection method
public com.ibm.serviceregistry.ServiceRegistrySession
getSessionConnection(java.lang.String user,
java.lang.String password)
throws java.rmi.RemoteException,
javax.naming.NamingException,
javax.ejb.CreateException,
CLIException
303
Returns a connection to the WSRR core session bean, using the session
bean connection parameters in the configuration.
Parameters:
user - user name to use for authentication, or null
password - password to use for authentication, or null
Returns:
ServiceRegistrySession instance
Example 8-18 getOntologyConnection method
public com.ibm.serviceregistry.ServiceRegistryOntology
getOntologyConnection(java.lang.String user,
java.lang.String password)
throws java.rmi.RemoteException,
javax.naming.NamingException,
javax.ejb.CreateException,
CLIException
Returns connection to the WSRR Ontology manager, using the session bean
connection parameters in the configuration.
Parameters:
user - user name to use for authentication, or null
password - password to use for authentication, or null
Returns:
ServiceRegistryOntology instance
Example 8-19 getGovernanceConnection method
public com.ibm.serviceregistry.governance.ServiceRegistryGovernance
getGovernanceConnection(java.lang.String user,
java.lang.String password)
throws java.rmi.RemoteException,
javax.naming.NamingException,
javax.ejb.CreateException,
CLIException
Returns connection to the WSRR Governance bean, using the session bean
connection parameters in the configuration.
Parameters:
user - user name to use for authentication, or null
304
public com.ibm.serviceregistry.admin.ServiceRegistryRepositoryProxy
getServiceRegistryRepositoryProxy(String user, String password)
throws ServiceRegistryException {
Gets ServiceRegistryRepositoryProxy instance using mbean connection
parameters from configuration. The proxy represents a
ServiceRegistryRepository MBean and provices methods that correspond to
the operations defined in the ServiceRegistryRepository MBean
descriptor.
Parameters:
user - user name to use for authentication, or null
password - password to use for authentication, null
Returns:
ServiceRegistryRepositoryProxy instance
Example 8-21 getProperties method
305
306
The import.py script imports an object into a WSRR instance from the
supplied file
Usage: import.py -a <alias> -c <configFile> -u <user> -p
<password> -in <inputFile>
The promote.py script promotes an object from one WSRR instance to
another
Usage: promote.py -c
<sourceUserName> -sp
<targerUserName> -tp
<objectNamespace> -v
307
308
The uri parameter is the OWL URI of the ontology system. When an ontology
system is deleted, it is no longer available for use in the Web user interface.
A Jacl script is provided to perform this operation using wsadmin:
<WSRR_HOME>\admin\scripts\deleteOntologySystem.jacl
Note: Before removing an ontology system you should consider the impact to
users who may have classified WSRR entities with the ontology. Deleting the
ontology system will not remove classification URIs from entities, so queries
relying on these classifications will still work. However, if users try to view an
entity with a classification that no longer exists in an ontology system, the UI
will not be able to retrieve the corresponding labels and will report an error. In
addition, users will not be able to add further classifications from that ontology
system.
309
Transition
Permission to apply a transition as defined by an existing governance lifecycle
to an artefact in WSRR.
Each of these types of permission is independent of all the others, and there are
no implicit relationships between them. For instance, permission to delete an
artefact does not imply that permission to update the same artefact is
automatically granted, although permission to update could be defined explicitly.
Permissions are granted to roles. The number and names of the roles used to
control access within WSRR is configurable by the user. Typically each role
defined would map to a group of users defined within the user authentication
scheme being used. Permissions are then granted to each of the defined roles as
appropriate and all users belonging to a given role have the access permissions
granted to that role.
The artefacts to which a particular permission applies are defined using a subset
of XPath. Using this subset it is possible to specify sets of artefacts by their type
(WSDLDocument for example), by their modelled and user-defined properties,
and by their classification. In this way sets of artefacts can be defined in a
generic way.
Once permission for a given type of access has been defined for a particular set
of artefacts, for a given role, then every role which requires that access to that set
of artefacts must be granted that permission explicitly. Expressing it a different
way: access to all artefacts within the registry is unrestricted until a permission is
granted protecting a particular set of artefacts. Once this happens explicit
permission is then required for the defined access type to the defined set of
artefacts.
Note: The statements made in the preceding paragraph apply independently
to each of the permission types defined previously. For example, granting
update permission to a role for a set of artefacts will not protect those artefacts
from deletion by any role. That protection must come from an explicit
declaration of delete permission granted to the appropriate role, after which
users in other roles will not be able to delete them without explicit permission.
310
addition and removal of permissions for those roles. Operations are also
available to ensure changes made to the policy are made permanent such that
the saved policy is available when WSRR is restarted. Jacl scripts to apply these
operations are supplied in the <WSRR_HOME>\admin\scripts directory.
Refer to the following documentation sources for further information.
WebSphere Application Server scripting:
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/topic/com.ibm.
websphere.base.doc/info/aes/ae/txml_scriptingep.html
WSRR MBean API specification:
http://publib.boulder.ibm.com/infocenter/sr/v6r0/topic/com.ibm.sr.ja
vadoc.doc/WSRR_MBean.html
8.9 Import/Export
WSRR provides a facility for exporting collections of entities, with their associated
metadata, to a file, and importing that file back into another WSRR instance.
The WSRR export function extracts entities from the source registry and writes a
document describing selected entities and their properties, relationships and
classifications. The WSRR import function reads the export document and
publishes the entities with their metadata into a target registry. This enables a
number of possible administrative tasks, for example:
Selective backup and restore
Promotion to another WSRR instance (see 8.10, Environment promotion on
page 319)
Bulk loading of registry metadata
WSRR defines a schema for the format of this import/export file. This schema is
proprietary and published but is expected to change in forthcoming releases as
standards in this area emerge. It is recognized that users may want to manipulate
the exported data for administrative tasks so the schema has been provided and
is explained in a subsequent section.
8.9.1 Export
Only original documents should be exported, as all logical objects and metadata
associated with the original document will be exported to support it; this is
because the logical objects and metadata cannot exist without the original
311
document, so any metadata exported must also have its original document
exported.
The export function is based on the document bsrURI, so some pre-selection of
documents for export must be carried out. Document pre-selection and export
can be performed within the Web user interface.
An exported document will be accompanied by everything to which it is related; if
it is related to some metadata from another document then that document will be
contained within the export. The exported content is then a full WSRR
representation of anything to which the requested document is related, taken to
the full hierarchical depth.
If a large portion of the documents in the registry are connected via relationships
then simply exporting one could result in this large portion of the WSRR also
being exported. Care should be taken to avoid large portions of the registry being
connected in this manner and some examination of the document for export
should be carried out. Export should not be used with a large list of documents.
It should be noted that the bsrURI is exported as a normal property; however on
import, the value of this will be overwritten by a bsrURI specific to the import
registry. In addition, the exported file will contain only the classification URI, not
the ontology to which this refers.
To export artefacts from WSRR through the UI, use the Export button provided in
the document collection views. Figure 8-1 shows the Policy documents
collection, the export button is circled.
312
8.9.2 Import
Since files for import can be created outside WSRR, and those exported from
WSRR can be manipulated, the import process follows the same process and
validation as normal creation of the document. This ensures that badly formed
import/export files will not cause problems for the registry.
The difference with import is that the file for import will contain not only the
original document but its full WSRR representation, with all supporting
documents, relationships, user-defined properties and classifications. These will
also get created in the same transaction.
The document explicitly exported must not exist in the registry on import as this
would have the same effect as trying to create an already existing document.
Supporting documents can, however, already exist within the registry and the
import will attempt to find these supporting documents and use any existing ones
in place of those in the import file. As a result, the document imported will match
that in the import/export file at the top level; however, as relationships are
followed down the graph, documents may be encountered which already exist
within the repository. Import will not alter these pre-existing supporting
documents so importing a document can only result in the creation of new
documents or relationships to existing ones; it will not result in the altering of an
already existing document.
If it is required that the import/export file exactly matches the registry after import,
then either none of the supporting documents should exist within the repository,
or each supporting document should have been previously imported.
Any logical objects (also referred to as logical derivations) included within the
import file are used to update logical objects created through the normal creation
process. Therefore, for the purposes of import, if these logical objects are not
present in the import file then the import will go through the normal creation
process and they will be created anyway. If the logical objects are present in the
import file then any user defined properties, relationships, and classifications can
be added to the created logical objects during import. Modelled properties will
not be overridden.
The following examples illustrate the process:
1. A is related to B:
If A is exported then B will be exported as a supporting document
If the export file is then imported into a registry which already contains B,
A is created and the relationship is set up to the existing B which remains
unmodified. The supporting B in the import file is not used so any user
313
defined metadata on B in the import file is not set on the existing B in the
registry.
2. A is related to B, and B is related to C:
If A is exported then B and C will be exported as supporting documents.
If the export file is then imported into a registry which already contains B,
A is created and the relationship is setup to the existing B which remains
unmodified. The supporting B in the import file is not used so any user
defined metadata on B in the import file is not set on the existing B in the
registry. C is also created since it was originally related to A via B but the
existing B is not updated since the relationship B to C may not be valid in
this new registry. However, since C is created it is possible to manually
create this relationship from B to C after the import has completed.
3. A logical object of A (logA) is related to a logical object of B (logB):
If A is exported then logA will also be exported. Since logA is related to
logB, B will be exported together with logB as a supporting document.
If the export file is then imported into a registry which already contains B
and, consequently, logB, then A is created, and the logA that is created as
a result of creating A has a relationship set up to the already existing logB.
B and logB remain unchanged. The supporting B and logB in the import
file are not used so any user defined metadata on B in the import file is not
set on the existing B in the registry.
Documents can be imported using the Web UI, click Administration Import.
Figure 8-2 shows the import screen.
314
315
316
317
318
319
320
321
322
addPrincipalToRole.jacl
addRole.jacl
getPermissionsForRole.jacl
getPolicyConfiguration.jacl
getRoleMappingConfiguration.jacl
getRoles.jacl
loadPolicyConfiguration.jacl
loadRoleMappingConfiguration.jacl
persistPolicy.jacl
persistRoleMappings.jacl
removeAllRolePermissions.jacl
removeAllRoles.jacl
removePermissionFromRole.jacl
removePrincipalFromRole.jacl
removeRole.jacl
323
324
Part 4
Part
Using WSRR
325
326
Chapter 9.
327
9.1 Introduction
Chapter 7, Installing and deploying on page 253 explains how to install
WebSphere Service Registry and Repository. We now cover how to use the main
interface to it, the Web UI.
The Web UI enables you to use and manage all aspects of WSRR from a
compatible Web browser.
Figure 9-1 shows the WSRR Web UI welcome window.
This chapter covers the basics of how to use the Web UI. It will then guide you
through using it to perform some basic operations such as loading a document,
adding relationships, classifications, and so on.
328
329
9.2.5 Queries
Use the query wizard to perform selected queries against objects stored in the
registry. See 9.7, Searching the registry on page 363 for more information.
330
currently being monitored. Administrators have an additional link that shows the
list of all subscriptions currently active in the registry for all users.
My favorites shows the list of objects in the registry that the current user has
selected as favorites.
My preferences shows configuration settings that allow you to alter the
appearance of elements in the Web UI. The only setting that can be changed
currently is the time zone that you want to use when dates and times are
displayed on screen.
9.2.8 Administration
The Administration section of the navigation tree allows an administrator to
import objects into the registry. Only files generated by the export facility can be
imported back into the registry. No other file formats are supported.
331
1. From the navigation pane expand the Service Documents section and then
select Load Document as shown in Figure 9-2.
Alternatively there is a Load Document button on the collection view for each
of the supported Service Document types as shown in Figure 9-3.
2. The load document wizard should then open in the workarea tab.
332
3. Select the document you want to load and optionally specify a description and
version for it. If you loaded the wizard using the Load Document link from the
navigation tree then you must also specify the document type. See Figure 9-4
for an example of the load document wizard.
333
4. The document should now be loaded and a screen similar to Figure 9-5
should display.
Once the document has been loaded a detail page summarizes the properties of
the object. There are also links to the logical objects that were derived from the
source document.
334
Any properties that are not read-only may be set from this page. The changes
will be committed when either the OK or the Apply buttons are pressed.
Clicking on the Content tab shows the contents of the source document (as in
Figure 9-6).
9.4 Properties
WSRR is not intended to be an editor for any of the artefacts it stores. For
instance, when the WSDL for a service is published to WSRR, read-only logical
elements are created to represent its contents.
These elements are read-only because changing their properties would mean
the logical model would no longer be in sync with the content of the original
WSDL document.
335
336
2. The list of current properties on the document will then appear. Clicking on
the name of any of the existing properties will allow you to edit the value of
that property. Some of the properties are compulsory, and so the delete check
box next to those properties is greyed out.
At the top of this list is a New button as shown in Figure 9-8. Click New.
337
3. You will then be prompted for a Key and Value for the new custom property.
Enter your desired values for these fields as demonstrated in Figure 9-9.
Then click OK.
338
4. The new property has now been added and you should see it in the list of
properties, as shown in Figure 9-10.
339
340
1. From the documents details page select Custom properties from the
Additional properties links on the right, as highlighted in Figure 9-12.
341
2. Click the name of the property you want to edit. In Figure 9-13 we are going to
edit the value of the ServiceLevel custom property.
342
3. Change the value of the property to whatever you want it to be and then click
OK (see Figure 9-14).
343
4. You should then be able to see the new value for the property in the
properties list as shown in Figure 9-15.
344
1. From the documents details page select Custom properties from the
Additional properties links on the right, as highlighted in Figure 9-16.
345
2. Select the check box for the custom property you want to delete and then click
the Delete button as highlighted in Figure 9-17.
3. You should now get a confirmation message that the property was deleted as
in Figure 9-18 on page 347.
346
9.5 Relationships
Relationships, similar to properties, allow users to annotate objects in WSRR
with service metadata.
They are modelled within WSRR as List properties on the underlying SDOs.
They are 1:many (1 source object, many target objects) and are uni-directional.
The object on which the relationship is defined is the source object of the
relationship.
The relationship property contains the list of WSRR objects that are the target of
the relationship.
347
348
349
4. The custom relationship wizard should now open. Enter a name for the
relationship and click Next as shown in Figure 9-22 on page 351.
350
5. You will now need to find the document(s) to create a relationship to. Select
the type of document to query for and then click Next (see Figure 9-23).
6. You now need to enter the search criteria to find the specific documents to
create a relationship to. You can query by different criteria, in our case we
knew the name of the document Address.wsdl and so typed that in the
Name field, as shown in Figure 9-24 on page 352. Click Next once you have
entered the desired search criteria.
351
7. It will now display the results of your search query. You can now select the
precise documents you want to create a relationship to. Check the check box
next to the desired target document and click Next. (See Figure 9-25 on
page 353.)
352
8. You will now see a summary of the proposed new relationship as shown in
Figure 9-26. If all the details seem correct then click Finish.
353
9. The relationship has now been created and you should see output similar to
that in Figure 9-27.
354
2. When the custom relationships list appears, click the name of the relationship
you want to edit, as shown in Figure 9-29 on page 356.
355
3. You will then be displayed with the list of current targets for that relationship
similar to Figure 9-30. To add a new target click the Add button and you will
then have to follow a similar process to that used to find the target of the
relationship when creating a new relationship in 9.5.1, Creating a new
relationship on page 347. The main differences are that you cannot specify
the relationship name and you must specify a target object.
To remove a target, check the check box next to that target and click the
Remove button.
356
2. You should now see a confirmation message similar to that in Figure 9-32.
357
2. You will then be prompted for the path to the OWL file. Either type in the path
to your OWL file or browse until you find it. Then click OK. (See Figure 9-34
on page 359.)
358
3. Once the classification has been loaded you should see a confirmation
message similar to that displayed in Figure 9-35.
359
2. You should then see a tree structure representing all of the loaded ontologies
as shown in Figure 9-37.
360
361
3. Select the classification you want to classify this entity as, from the tree
structure on the left and then click the Add button. This is shown in
Figure 9-40 on page 363.
362
4. You should now see your added classification in the Classification List box
on the right. Click the OK button.
Note: Multiple classifications can be added at the same time, just keep
selecting classifications from the tree on the right and click the Add button.
5. Your classification has now been added and you should have been returned
to the detail view for the entity.
363
2. Select the type of query from the drop down list shown in Figure 9-42 on
page 365. For the purposes of this example we will query by classification,
and so we selected Entities by Classification. Then click OK.
364
365
366
5. You should now see the classification you selected in the list box on the query
wizard screen, as shown in Figure 9-45 on page 368. Click Next.
367
6. The query wizard will now display a summary of the query to be run (see
Figure 9-46 on page 369). Click Finish.
368
7. The query results should now be displayed. Figure 9-47 shows an example of
the results screen.
369
1. First you must navigate to the collection view for the type of document you
want to delete.
2. Then select the check boxes next to the document that you want to delete and
click the Delete button as shown in Figure 9-48.
3. You should then receive a confirmation message to state the document was
deleted from WSRR.
9.9 Concepts
WSRR models the content of the artefacts that it stores. However, it is possible
you will want to work with business objects that do not exactly match those
370
<xsd:complexType name=Application>
<xsd:attribute name=businessOwner type=xsd:string />
<xsd:attribute name=referncedServices type=xsd:IDREFS />
<xsd:attribute name=referencedProcesses type=xsd:IDREFS />
</xsd:complexType>
Creating a new concept instance using the Application template would result in a
new concept with the following metadata associated with it:
A custom property called businessOwner
A custom relationship called referencedServices
A custom relationship called referencedProcesses
371
The Template classification is provided within WSRR as part of the WSRR Core
Ontology as shown in Figure 9-49.
372
This will then display a screen similar to that shown in Figure 9-51, displaying a
list of the templates currently available in WSRR.
Clicking on an individual template will display the details for that specific template
as shown in Figure 9-52 on page 374.
373
374
2. Select the Template you want to use for the new concept instance. Click the
Create new instance button as shown in Figure 9-54.
375
3. Fill in the fields as necessary for your template and then click OK. The
example shown in Figure 9-55 is based on the JMSEndpoint template created
by the WMB V6 Client for WebSphere Service Registry and Repository.
4. Your new instance should now have been created. The next section will
explain how to view the details on it.
Custom properties that will be added by the template are shown in a separate
section below the General Properties. Custom relationships defined by the
template are not shown until after the new concept instance has been created.
376
377
378
379
380
10
Chapter 10.
381
10.1 Introduction
As covered in 4.3, Web user interface (Web UI) on page 144, WSRR provides
extensive customization capabilities for its user interface. These customization
capabilities range from simply modifying the properties that are displayed on an
existing view of a service to deploying a whole new perspective that defines new
views for the information stored in Service Registry and Repository. This new
perspective may be specific to a certain kind of user within your organization,
using terminology that the user can understand and restricting the information
displayed to the minimum that allows the user to perform their day-to-day job.
Section 4.3, Web user interface (Web UI) on page 144 describes the concepts
and architecture of the WebSphere Service Registry and Repository Web user
interface.
This chapter goes into more detail on the underlying technology powering that
flexibility and how you can customize it for your own needs. For demonstration
purposes we will use the example scenario that comes with the WebSphere
Message Broker V6 Client for WebSphere Service Registry and Repository
SupportPac. The scenario is described in more detail in 16.7, WMB Client
support for SOA patterns on page 803. We will describe how to perform the
customizations necessary for that scenario, however the UI customization files
necessary for it are actually provided with the SupportPac in the following
directory:
<WMBClient_Install>\Tests\WSRRTestEntities\GUIConfiguration
Where <WMBClient_Install> is the directory the WMB V6 Client for WebSphere
Service Registry and Repository is installed to.
382
View query definitions allow you to perform a rich set of queries against just
about any type of object that WSRR can store. The possible parameters include
object type, classifications, properties and relationships, all of which can be used
in any combination. This covers all three categories of metadata that WSRR
supports so should allow the maximum flexibility to find the required objects in
the registry.
Let us begin with a simple view query which we can build on to explain other
features. In Example 10-1 the XML namespace attributes are listed for
informational purposes, however they will be omitted from the later examples in
this chapter for the sake of clarity.
Example 10-1 Basic view query
<ViewQueryDefinitionSet
xmlns="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/ViewQueryDefin
itionSet"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.ibm.com/xmlns/prod/serviceregistry/6/0/ViewQueryDefinitionS
et ../../schemas/ViewQueryDefinitionSet.xsd">
<QueryDefinitions>
<Query id="showWSDLs">
<ObjectType>WSDLService</ObjectType>
</QueryDefinitions>
</ViewQueryDefinitionSet>
Each view consists of a separate Query element that is contained within the
QueryDefinitions element. There is no limit to the number of queries that can be
defined except for physical storage since each one will be represented in
memory at startup. Each query must have a unique ID represented as the id
attribute within the Query element. It is recommended that the query ID start with
a short prefix so as to minimize the chances of a name conflict with other view
query definitions already defined in the system. Note that there is one exception
to the unique ID rule; it is possible to override an existing system-defined view
query with a user-defined one by creating the user view query with the same ID.
This should only be used with caution since changing a system view query could
affect the expected operation of the default perspective views.
The query in Example 10-1 returns all WSDLService objects currently stored in the
registry and introduces the ObjectType element. The object type is an optional
element that filters the query to return only objects of the given type. The type
can only be chosen from a fixed list of types that correspond to the Service Data
Objects (SDO) types currently supported for querying in the registry. Table 10-1
on page 384 shows the list of valid object types that can be used.
383
384
Object type
Description
WSDLDocument
WSDL document
XMLDocument
XML document
XSDDocument
PolicyDocument
Policy document
GenericObject
WSDLBinding
WSDLMessage
WSDLOperation
WSDLPart
WSDLPort
WSDLPortType
WSDLService
SOAPAddress
SOAPBinding
XSDAttribute
XSDComplexType
XSDSimpleType
XMLElement
SCAModule
ModuleDocument
ImportDocument
ExportDocument
Module
Import
Export
SCAImportBinding
Object type
Description
SLSBImportBinding
WebServiceImportBinding
SCAWSDLPortType
SCAExportBinding
WebServiceExportBinding
Subscription
Subscription object
Note: GenericObject is the API name for the objects that appear in the Web
UI as Concepts.
The ObjectType element is not a required setting - omitting the value will
cause the query to consider all searchable registry objects as part of the query
(that is, all objects that derive from the BaseObject SDO parent class).
<ViewQueryDefinitionSet>
<QueryDefinitions>
<Query id="showEndpoints">
<DisplayType>MBPatternEndpoint</DisplayType>
<QueryClassificationsAnyOf>
<ClassificationURI>
http://eis.ibm.com/ServiceRegistry/GenericObjectTypes#Endpoint</Classif
icationURI>
385
</QueryClassificationsAnyOf>
</Query>
</QueryDefinitions>
</ViewQueryDefinitionSet>
The DisplayType element instructs the Web UI to use a different view definition
to display the results of the query. This view definition is referenced by its unique
ID which is mapped to a collection view definition in the perspective definition file.
More detailed information about how to create perspectives and view definitions
can be found in 10.4, Perspectives on page 394.
<ViewQueryDefinitionSet>
<QueryDefinitions>
<Query id="showJMSEndpoints">
<DisplayType>MBPatternEndpoint</DisplayType>
<Property name="endpointtype" value="JMS"/>
</Query>
</QueryDefinitions>
</ViewQueryDefinitionSet>
In this example the query is looking for all objects that contain a property called
endpointtype that has an exact value of JMS. It's also possible to omit either
one of name or value to widen the search. Omitting the value attribute will
change the query such that it will now search for all objects of the given type that
contain a property of the given name regardless of the value. Similarly, omitting
the value attribute will change the meaning of the query such that it will now
search for all objects of the given type that contain any property that has the
given value as an exact match.
386
objects to ensure that the objects found in the search are of the correct templated
type. Example 10-4 shows the syntax of just such a query:
Example 10-4 Querying by relationship
<ViewQueryDefinitionSet>
<QueryDefinitions>
<Query id="MBViewJMSTemplated">
<ObjectType>GenericObject</ObjectType>
<Relationship name="template">
<Target>
<Property name="name" value="JMSEndpoint"/>
</Target>
</Relationship>
</Query>
</QueryDefinitions>
</ViewQueryDefinitionSet>
This query reads as find all the generic objects that have a relationship called
'template' where the target object of that relationship has a name of
'JMSEndpoint'. This introduces several new elements to the query. Firstly, the
Relationship element which declares that the query is looking for a relationship
on the objects of the given type. This has one optional attribute that gives the
specific name of the relationship to look for which can be either a modelled
relationship or a user-defined relationship. This is an exact match test and wild
cards are not expanded in the value. Omitting the name of the relationship
means the query will look for target objects for any relationship on the initial list of
objects filtered by the given type.
The Relationship element can contain a Target child element that directs the
query to consider the objects that are at the target of the relationship. The Target
element must contain exactly one Property element declaring which name/value
pair to look for on the target object. It is not possible to specify more than one
property to look for when considering the target objects of a relationship. The
rules for the Property element when used within a target object search are
exactly the same as when they are used in the main body of the query. The
Target element is optional - omitting it means that the query will be widened to
search purely for objects that have the named relationship.
387
OWL URI from the classification system that was used to classify the object.
Searches involving classifications that have child OWL URIs in the classification
system (that is, there are additional classifications that are a subClassOf the
given URI in OWL terms) can additionally be used such that the URI given and all
of its inferred child URIs are also considered as part of the search. For example a
classification search on Fruit with inference would also consider Apple and
Orange as additional classifications as part of the search. Table 10-2 shows the
four elements and their behavior.
Table 10-2 Classification elements
Element
Meaning
QueryClassificationsAnyOf
QueryClassificationsAllOf
QueryExactClassificationsAnyOf
QueryExactClassificationsAllOf
For our example WMB Patterns scenario we use a simple OWL file to classify
services. It is used to mark services as a particular type and impose a hierarchy
where JMSEndpoint, MQEndpoint and URLEndpoint are all children of Endpoint.
Example 10-5 shows a snippet from the OWL file used. The complete file can be
found here:
<WMBClient_Install>\Tests\WSRRTestEntities\Classifications\GenericObjec
tTypes.owl
Example 10-5 Sample OWL file
<?xml version="1.0"?>
<rdf:RDF
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns="http://eis.ibm.com/ServiceRegistry/GenericObjectTypes#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xml:base="http://eis.ibm.com/ServiceRegistry/GenericObjectTypes">
<owl:Ontology rdf:about="">
388
<rdfs:label
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">MB Nodes Concept
Types</rdfs:label>
</owl:Ontology>
<owl:Class rdf:ID="Endpoint">
<rdfs:label
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Endpoint</rdfs:l
abel>
</owl:Class>
<owl:Class rdf:ID="JMSEndpoint">
<rdfs:label
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">JMSEndpoint</rdf
s:label>
<rdfs:subClassOf rdf:resource="#Endpoint"/>
</owl:Class>
<owl:Class rdf:ID="URLEndpoint">
<rdfs:label
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">URLEndpoint</rdf
s:label>
<rdfs:subClassOf rdf:resource="#Endpoint"/>
</owl:Class>
<owl:Class rdf:ID="MQEndpoint">
<rdfs:label
rdf:datatype="http://www.w3.org/2001/XMLSchema#string">MQEndpoint</rdfs
:label>
<rdfs:subClassOf rdf:resource="#Endpoint"/>
</owl:Class>
</rdf:RDF>
In our WMB Patterns scenario we use a view query using classifications to show
the MQEndpoints as shown in Example 10-6.
Example 10-6 Querying by classification
<ViewQueryDefinitionSet>
<QueryDefinitions>
<Query id="showMQEndpoints">
<DisplayType>MBPatternMQEndpoint</DisplayType>
<QueryClassificationsAnyOf>
<ClassificationURI>
http://eis.ibm.com/ServiceRegistry/GenericObjectTypes#MQEndpoint</Class
ificationURI>
</QueryClassificationsAnyOf>
</Query>
</QueryDefinitions>
389
</ViewQueryDefinitionSet>
View queries are restricted to allowing just one classification-type element per
query, chosen from the list of four available. Finding the fully qualified OWL URI
for a classification value can sometimes be tricky even if you have access to the
source of the OWL document. There is a simple procedure that can be used in
the Web UI that will allow you to find the full URI of any classification value. In the
Web UI, navigate to any object either in a collection view or detail view. From a
collection view, select the object from the list and click Add classifications, or
from a detail view, click the Classifications link in the relationships section. Note
that you do not need to update the object with new classifications, this is purely to
get a specific view in the Web UI. Once in the classifications view, the full OWL
URI of any classification value can be obtained by selecting the classification in
the classification list which then shows the full details of that value in the table at
the bottom of the page. The URI can then be copied and pasted from the Web UI.
If the classification value is not in the list, then it can be added to the list by
browsing the tree, selecting the value and clicking the Add button. If you are not
intending to update the classifications on the object, remember to click the
Cancel button when complete.
390
The navigation tree for our WMB Patterns scenario introduces a completely new
top-level grouping called Message Broker Pattern Metadata which collects
together all the custom views that we need for monitoring the services in the
registry. It also re-uses the query wizard, classification, and other sections from
the default navigation trees supplied with WSRR.
391
Navigation tree
View query
definition
<Query id="showRouters">
<DisplayType>MBPatternRouter</DisplayType>
<QueryClassificationsAnyOf>
<ClassificationURI>http://eis.ibm.com/ServiceRegistry/GenericObject
Types#Router<ClassificationURI>
</QueryClassificationsAnyOf>
</Query>
The diagram shows that there are two parts to each node definition in the
navigation tree. The display part is a resource key (and optional resource bundle)
that defines the text to be displayed for the node in the tree, and the link part that
defines what action will be performed when you click the link in the tree. In our
example, the link runs the view query specified by the view query ID in the
navigation tree node.
Example 10-7 shows part of the navigation tree definition file used to display the
tree for the sample scenario.
Example 10-7 Example navigation tree
392
name="MBPatternUserNavigationTree">
<node id="navtree_root"
node-resource-key="navigationtree.service.registry">
<node id="mbnodes"
node-resource-key="mbpattern.navigationtree.title"
node-resource-bundle="MBPatternResources">
<node id="routers"
node-resource-key="mbpattern.navigationtree.routers"
node-resource-bundle="MBPatternResources" view-query-id="showRouters"/>
...
</node>
...
<node id="queries"
node-resource-key="navigationtree.service.queries">
<node id="qwizard"
node-resource-key="navigationtree.service.queries.wizard"
forward="QueryWizardPrepare"/>
</node>
...
</node>
</NavigationTree>
The enclosing NavigationTree element has just one attribute name that must be
unique within the context of all navigation trees within WSRR. This name is used
directly by the perspective definition file to declare which navigation tree to use.
There is only one other element node used to construct the navigation tree. Node
elements can be nested to any depth and will form the tree hierarchy in the
navigation pane of the Web UI. The outer-most node with the ID of navtree_root
must be present in the definition file - it doesn't get displayed but acts as the
container for all the displayable nodes. The first level nodes under the root node
form the main content sections of the tree and are highlighted as main headings
in the navigation pane. Content sections cannot be set as links to views, they
only serve to contain other nodes and are always displayed in the navigation
pane.
The node element has just two required attributes: id which must be unique
within the navigation definition file and node-resource-key which defines the key
to use in the resource file for the display text for the node. To go with the resource
key there is the optional node-resource-bundle attribute that lets you specify a
different resource file to load display text from. If this is omitted, then the resource
bundle defaults to the built-in resources used by the Web UI. Any user-supplied
resource properties file must be available on the WAS classpath - in the default
profile the easiest directory to use would be
<WAS_HOME>/profiles/default/classes.
393
There are two ways to specify the way the active link works when using the node
element. The main way is to use the view-query-id attribute and specify its value
as the ID of a view query stored in a view query definition file. View query links
are typically used to display collections of objects stored in the registry, however
not every possible view or action in WSRR can be represented by a view query
so there is a second attribute forward that can be used to forward to the special
view, wizard or action. Table 10-3 details exactly what forwards can be used and
what action they perform.
Table 10-3 Special navigation forwards
Forward
Action performed
LoadDocument
QueryWizardPrepare
LoadClassificationSystem
BrowseClassificationSystem
ListMySubscriptions
ListMyFavourites
ShowPreferences
ImportDocuments
10.4 Perspectives
Perspectives are used in the WSRR Web User Interface to provide a user role
the appropriate view of the data and the ability to perform their tasks. The
Administrator perspective allows you to load classification systems and import
data among other tasks. The User perspective lets you browse the classification
system, load documents and browse the artefacts in the Service Registry and
Repository. The perspective developed for the WMB Patterns scenario shows
metadata relevant to their business.
In order to show the WMB Patterns scenario metadata, we have created a
custom MB Pattern User perspective which shows the navigation tree from
Figure 10-1 on page 391 and their services' operational and static metadata in
collection and detail views.
394
A perspective definition describes the title of the perspective, the navigation tree,
which user roles are permitted to use the perspective, and which collection and
detail views are to be shown. Figure 10-3 shows the MB Pattern User
perspective starting page.
395
<title-message message-key=""/>
<roles>
<role>role</role>
</roles>
<navigation-tree-name>navigation-tree-name</navigation-tree-name>
<detail-view-mappings/>
<collection-view-mappings/>
</perspective-definition>
396
397
Example 10-10 shows the MB Pattern User perspective definition which specifies
a weight of 40 and a navigation tree called MBPatternUserNavigationTree.
Example 10-10 Perspective weight and navigation tree
398
Customized mappings
We have developed several collection views detail views for the WMB Pattern
scenario. These views show the static and operational metadata of interest to the
scenario. In order to use them from view queries and collection views, these
views must be added to the mapping sections.
To add mappings for our new collection views, the collection-view-mappings
element has several view-mapping elements added. These map between the
display type names used in the view queries in 10.2, View query definitions on
page 382 and our collection views. The mappings are shown in Example 10-11.
Example 10-11 New collection view mappings
<collection-view-mappings>
<view-mapping display-type="MBPatternRouter"
view-definition-name="MBPatternRouter" />
<view-mapping display-type="MBPatternTranscoder"
view-definition-name="MBPatternTranscoder" />
<view-mapping display-type="MBPatternEndpoint"
view-definition-name="MBPatternEndpoint" />
<view-mapping display-type="MBPatternJMSEndpoint"
view-definition-name="MBPatternJMSEndpoint" />
399
<view-mapping display-type="MBPatternMQEndpoint"
view-definition-name="MBPatternMQEndpoint" />
<view-mapping display-type="MBPatternURLEndpoint"
view-definition-name="MBPatternURLEndpoint" />
<view-mapping display-type="MBPatternRouting"
view-definition-name="MBPatternRouting" />
...
</collection-view-mappings>
To add mappings for our new detail views the detail-view-mappings element
has a new view-mapping element added, as shown in Example 10-12.
Example 10-12 New detail view mappings
<detail-view-mappings>
<view-mapping display-type="MBPatternRouter"
view-definition-name="MBPatternRouter" />
<view-mapping display-type="MBPatternTranscoder"
view-definition-name="MBPatternTranscoder" />
<view-mapping display-type="MBPatternEndpoint"
view-definition-name="MBPatternEndpoint" />
<view-mapping display-type="MBPatternJMSEndpoint"
view-definition-name="MBPatternJMSEndpoint" />
<view-mapping display-type="MBPatternMQEndpoint"
view-definition-name="MBPatternMQEndpoint" />
<view-mapping display-type="MBPatternURLEndpoint"
view-definition-name="MBPatternURLEndpoint" />
<view-mapping display-type="MBPatternRouting"
view-definition-name="MBPatternRouting" />
...
</detail-view-mappings>
400
401
Description
Button Definitions
Column
Definition
Column
Definition
Column
Definition
Column
Definition
402
<description-message message-key=""/>
</messages>
<column-definitions>
<column-definition>
<heading-message message-key=""/>
<property-name>property-name</property-name>
</column-definition>
</column-definitions>
</collection-view-definition>
403
xsi:schemaLocation=
"http://www.ibm.com/xmlns/prod/serviceregistry/6/0/CollectionViewDefini
tion
../../../schemas/CollectionViewDefinition.xsd ">
<messages>
<title-message
message-key="mbpattern.collection.view.mqendpoints.title"
resource-bundle-name="MBPatternResources" />
<description-message
message-key="mbpattern.collection.view.mqendpoints.description"
resource-bundle-name="MBPatternResources" />
</messages>
<column-definitions>
<column-definition>
<heading-message message-key=""/>
<property-name>property-name</property-name>
</column-definition>
</column-definitions>
</collection-view-definition>
The title appears in several places; at the top of the collection view and in the
portlet title. It also appears as the entry in the bread crumb trail. Figure 10-6
shows where these new additions appear.
404
from WSRR, each in a row. Each entity has a number of properties with a name
and value. A column definition identifies the name of a property on the entity, the
value of which is shown in the cell. This is done by the value of the property
element.
A cell value can be rendered as plain text, or as a HTML link which links to a
detail view of the entity in the row. Typically the first column of a collection view is
a set of HTML links allowing the user to see details of the entities shown. Adding
an action element with the value of DetailView makes the cell a link to a detail
view.
You can specify which detail view is used to show the entity, using a customized
view instead of the Web UI default. This is done by adding a display-type
element, the value of which is mapped to a detail view name in the perspective.
We will use the customized detail view developed for the WMB Pattern scenario
to show the MQ endpoints, called MBPatternMQEndpoint.
The first column in our view will show the name of the entity. All entities in WSRR
have a property called name which contains their name. Modify the
column-definition element to specify a message key for the column heading,
our resource bundle, the property name of name, add an action element with a
value of ViewDetail and a display-type element with a value of
MBPatternMQEndpoint. The new column definition is shown in Example 10-16.
Example 10-16 Adding a name column
<column-definitions>
<column-definition>
<heading-message message-key="collection.view.name"/>
<property-name>name</property-name>
<action>ViewDetail</action>
<display-type>MBPatternMQEndpoint</display-type>
<column-definition>
</column-definitions>
Figure 10-7 on page 406 shows the column you added to the collection view.
405
The value of display-type means the detail view looks up the view mapped to
the display type MBPatternMQEndpoint in the MB Pattern User perspective. This is
the detail view we shall develop later in this chapter. For other columns, we want
the cell values shown as plain text, so we will omit the action element.
The entities shown in a collection view are Service Data Objects (SDOs), each of
which has predefined properties, for example name or version. They can also
have user defined properties, which can be added from the Web UI or the API.
Both predefined and user defined property names can be specified in a collection
view definition. If a user defined property has not been added to a particular
entity, the cell will be empty.
We need to add the metadata of interest to our scenario to the collection view, so
we can see at a glance the available endpoints.
<column-definitions>
<column-definition filterable="true">
<heading-message message-key="collection.view.column.name" />
<property-name>name</property-name>
406
<action>ViewDetail</action>
<display-type>MBPatternMQEndpoint</display-type>
</column-definition>
<column-definition filterable="true">
<heading-message message-key="collection.view.column.description"
/>
<property-name>description</property-name>
</column-definition>
<column-definition filterable="true">
<heading-message message-key="collection.view.column.nameSpace"
/>
<property-name>namespace</property-name>
</column-definition>
</column-definitions>
407
...
</column-definitions>
<button-definitions>
<button-definition>
<button-message message-key="collectionButton.addProperties"/>
<button-action>addProperty</button-action>
</button-definition>
</button-definitions>
The button-message element specifies the message which appears on the
button, here we use a message from the WSRR resource bundle. The
button-action element specifies what happens when the button is clicked; its
value is from a predefined list of button actions, discussed in 10.5.6, Collection
view button action values on page 410. Figure 10-8 shows where the button you
added appears in the view.
408
Button action
collectionButton.new
createGenericObject
collectionButton.deleteItems
deleteItems
Button action
collectionButton.addProperty
addProperty
collectionButton.addRelationship
addRelationship
collectionButton.addClassifications
addClassifications
collectionButton.export
exportDocuments
collectionButton.subscribe
subscribe
collectionButton.addFavourites
addFavorites
<button-definitions>
<button-definition>
<button-message message-key="collectionButton.new" />
<button-action>createGenericObject</button-action>
<template-name>MQEndpoint</template-name>
</button-definition>
<button-definition>
<button-message message-key="collectionButton.deleteItems" />
<button-action>deleteItems</button-action>
</button-definition>
<button-definition>
<button-message message-key="collectionButton.addProperties" />
<button-action>addProperty</button-action>
</button-definition>
<button-definition>
<button-message message-key="collectionButton.addRelationship" />
<button-action>addRelationship</button-action>
</button-definition>
<button-definition>
<button-message message-key="collectionButton.addClassifications" />
<button-action>addClassifications</button-action>
</button-definition>
<button-definition>
<button-message message-key="collectionButton.export" />
<button-action>exportDocuments</button-action>
</button-definition>
<button-definition>
<button-message message-key="collectionButton.subscribe" />
<button-action>subscribe</button-action>
409
</button-definition>
<button-definition>
<button-message message-key="collectionButton.addFavourites" />
<button-action>addFavorites</button-action>
</button-definition>
</button-definitions>
410
mbpattern.collection.view.mqendpoints.title=MQ Endpoints
mbpattern.collection.view.mqendpoints.description=This is the
collection of the MQ Endpoints in the registry.
Description
Name
Type
UI_PERSPECTIVE
UI_VIEW_QUERY_USER_DEF
UI_NAVIGATION_TREE
UI_COLLECTION_VIEW
UI_DETAIL_VIEW
Content
System indicator
For each of the UI view definition files you create, you need to load a
corresponding configuration object of the appropriate type, as shown in
Table 10-6. As these are typically new view definitions, the configuration object
must be loaded with the system indicator value set to false.
Table 10-6 Configuration types and corresponding UI view definitions
Configuration type
UI_PERSPECTIVE
perspectives
411
Configuration type
UI_VIEW_QUERY_USER_DEF
view queries
UI_NAVIGATION_TREE
navigation trees
UI_COLLECTION_VIEW
collection views
UI_DETAIL_VIEW
detail views
loadConfiguration
updateConfiguration
deleteConfiguration
retrieveConfiguration
getConfigurationId
Previously, we defined view queries that return all endpoints that are classified
with type of MQ, JMS or URL (see 10.2.4, Querying by classification on
page 387). To support this classification of services, we would need to define an
ontology system as an OWL file and load into WSRR. The MBean operations for
loading and removing ontology systems are:
createOntologySystem
deleteOntologySystem
The pattern for invoking any MBean operation is the same: locate an MBean,
specify operation signature and parameters, invoke the named operation on the
MBean and cast any result object to an appropriate type.
For more information about how to use the WSRR Admin MBean, refer to 8.5,
Administering WSRR using JMX on page 292.
A sample script to load all the UI customizations that make up our scenario is
provided with the WMB V6 Client for WebSphere Service Registry and
412
413
414
11
Chapter 11.
415
416
You can rearrange the views in the workbench if you prefer. For more information,
see Moving and docking views in the Eclipse Workbench User Guide:
http://help.eclipse.org/help31/topic/org.eclipse.platform.doc.user/t
asks/tasks-3e.htm
The Eclipse UI connects the workbench to a local or remote instance of WSRR.
You can then work in the Service Registry view to perform the following tasks:
417
Before you can install and use the Eclipse UI, you must complete the following
tasks:
Install on your local computer an Eclipse workbench; for example,
WebSphere Integration Developer or Rational Software Architect. The
minimum level is Eclipse 3.0.2.
Install on your local computer the WebSphere Application Server Application
Client or WebSphere Application Server Application Server. For more
information about installing the Application Client, see Installing Application
Client for WebSphere Application Server in the WebSphere Application
Server information center. Alternatively, have access to a WebSphere
Application Server version 6.0.2 JRE.
Connect to the Internet.
To download and install the WSRR plug-in:
1. On the WSRR SupportPacs page
http://www.ibm.com/support/docview.wss?rs=3163&uid=swg27008751 click
SA02.
2. Download the WSRR Eclipse plug-in zip file to a local folder in your machine,
for example, C:\ITSO\WSRR\EclipsePlugin.
3. Start the Eclipse workbench.
4. In the workbench, from the Help menu, click Software Updates Find and
Install, as shown in Figure 11-2. The Install/Update wizard should now open.
418
5. In the wizard, click Search for new features to install (see Figure 11-3 on
page 419), then click Next.
6. The wizard lists the locations that are searched when searching for new
features.
7. Add a new location to search.
a. Click New Archived Site (as shown in Figure 11-4). The Select Local
Site Archive dialog opens.
419
b. Choose the WSRR Eclipse plug-in zip file you have downloaded.
c. Click OK.
The new location is added to the list in the wizard as shown in Figure 11-5.
420
8. Select the check box for the new location or archived site and then click Next
as shown in Figure 11-6 on page 422. If the location is secured, enter your
user name and password.
421
9. Eclipse searches the selected location or locations for new features. When
the search is complete, the available features that are relevant to your
installation are displayed in the wizard.
10.Select the check box for com.ibm.serviceregistry.core.feature, which
contains the WSRR plug-in, as shown in Figure 11-7 on page 423, and then
click Next.
422
11.Read the license agreements and click I accept the terms in the license
agreements to accept the terms, then click Next (see Figure 11-8 on
page 424).
423
12.Select the location on your local computer where you want to install the
WSRR plug-in (see Figure 11-9 on page 425). To add a new location, click
Add Site, and then browse to the location where you want to install the
WSRR plug-in.
424
13.Click Finish.
14.In the Jar Verification dialog (Figure 11-10 on page 426), click Install.
425
15.When prompted, click Yes to restart the Eclipse workbench, which completes
the installation. The WSRR plug-in is now installed in your Eclipse
workbench.
16.Open the Service Registry view:
a. From the window menu, click Show View Other. The Show View dialog
opens as in Figure 11-11 on page 427.
b. Expand the Service Registry folder.
c. Click Service Registry, then click OK.
426
You have now installed the WSRR Eclipse UI in your Eclipse workbench.
The next section covers configuration of the Eclipse UI to connect to WSRR.
427
428
c. In the Port field, type the port number of the WSRR WebSphere
Application Servers JNDI port. The default port number is 2809.
d. In the Security field, select the type of security to use for the connection:
429
e. Click OK. The new connection is listed on the WSRR Locations page of
the Preferences dialog.
430
Note: If you are connecting to a secure WSRR and the Eclipse plug-in
is installed in RSA (Rational Software Architect) V6 or WID
(WebSphere Integration Developer) V6, you need to start RSA or WID
with -vm argument to use JRE of WebSphere Client. For example
For RSA: rationalsdp.exe -vm
C:\RSA6.0\runtimes\base_v6\java\jre\bin\javaw.exe
For WID: wid.exe -vm
C:\RSA6.0\runtimes\base_v6\java\jre\bin\javaw.exe
7. Select the new location, checking the appropriate location, then click OK.
8. If you have previously connected to WSRR in this workbench session you will
have to restart the workbench to apply the changes. The Eclipse JVM caches
the security credentials of any previous WSRR connection, you must restart
the workbench to clear the cache.
You have now configured the WSRR Eclipse UI to connect to WSRR.
The following sections cover using the Eclipse UI to access WSRR.
431
2. In the Search dialog, select the criteria on which you want to search. You
must select, as a minimum, the type of object for which you are searching. For
example, select the WSDL check box to search for WSDL files as shown in
Figure 11-17 on page 433. The number of results that are returned depends
on how specific the criteria are.
432
3. Click Search. All objects in WSRR that match the search criteria that you
specified are displayed in the Retrieved Items dialog (see Figure 11-18 on
page 434) which opens when the search has completed.
433
434
If you want to retrieve all of the objects of a certain type from WSRR, you can
quickly do this if you right-click in the Service Registry view, then click the object
type that you want to retrieve; for example, to retrieve all the WSDL documents in
WSRR, click Retrieve WSDLs.
Now, you can import one or more of the retrieved documents into a project in
your local workspace.
435
4. In the wizard (see Figure 11-21 on page 437), click the name of the project
into which you want to import the document and ensure that the correct file
name is shown in the File Name field.
436
5. Optional: To import any objects that depend on the selected document, select
the Include all dependent artefacts check box.
6. Click Finish.
437
A copy of the document from WSRR is imported into the project in your local
workspace as shown in Figure 11-22.
You can now change or use the document as required.
438
439
3. The Add Properties wizard opens as in Figure 11-26 on page 441. In the
wizard, click Add.
440
4. The Add Property dialog opens as in Figure 11-27. In the dialog, type a
name for a new property and type the value for the property, then click OK.
441
view then you will see them in the User-defined category of the Properties
view, as highlighted in Figure 11-28.
442
3. The Add Relationships wizard opens as in Figure 11-30. In the wizard, type
the name of the relationship that you want to define, then click Next.
4. The wizard displays the Search dialog (see Figure 11-31 on page 444) so
that you can search for the document or documents you want to define the
relationship to.
443
5. Click Next. This will display the results of the search (see Figure 11-32). If no
results are found, either:
Click Back and re-specify your search criteria,
Or click Cancel. Check at least one document that you want to create a
relationship to, from your originally selected document.
6. Click Finish.
444
The new relationship is now defined between the documents in WSRR. This new
relationship can be seen in the User relationships category of the Properties
view as shown in Figure 11-33.
445
446
4. For each document click in the cell for the Relationship name (highlighted in
Figure 11-36). A cursor is displayed in the cell so that you can type in it. Press
Enter to apply each change.
5. Optional: Click Next, then add one or more properties to the concept.
6. Click Finish. A message confirms that the concept was successfully created.
The concept has now been created in WSRR as seen in Figure 11-37 on
page 448. You can check this by retrieving it using the Service Registry view.
447
448
2. In the wizard, type a name, description, and version for the concept (as shown
in Figure 11-39), then click Next.
449
4. Optional: Click Next, then add one or more properties to the concept.
5. Click Finish. A message confirms that the concept was successfully created.
The concept has now been created in WSRR as shown in Figure 11-41 on
page 451. You can check this by retrieving it using the Service Registry view.
450
451
452
12
Chapter 12.
Scenarios description
This chapter describes the example scenarios used later in this book in
Chapters 13, 14 and 15.
The topics covered are:
12.1, Services description on page 454
12.2, Requirements on page 458
12.3, Solution overview on page 458
453
/**
* ItemPriceSoapBindingImpl.java
*/
package com.ibm.itso;
454
/**
* ItemPriceDiscountedSoapBindingImpl.java
*/
package com.ibm.itso;
public class ItemPriceDiscountedSoapBindingImpl implements
455
com.ibm.itso.ItemPrice {
public int getPrice(java.lang.String itemName)
throws java.rmi.RemoteException {
int itemPrice = -90;
if (itemName.equals("Item1"))
itemPrice = 90;
else if (itemName.equals("Item2"))
itemPrice = 180;
else if (itemName.equals("Item3"))
itemPrice = 270;
else
throw new RuntimeException("ItemPriceDiscountedService:
Internal Error!!");
System.out.println("ItemPriceDelayed:: itemName: " + itemName
+ ", itemPrice: " + itemPrice);
return itemPrice;
}
}
They have two categories of customers, Gold and General. Gold customers are
privileged customers and get discounts on items. All price requests from Gold
customers should be handled by the discounted service. See Figure 12-2.
General
IBM-ITSO Ltd.
ItemPriceService
ItemPriceDiscountedService
Gold
Both services use the ItemPrice PortType but have different endpoints. See
Figure 12-3 on page 457.
456
getPrice
(Operation)
ItemPrice
(PortType)
ItemPriceService
SOAP Endpoint
ItemPrice
(Port)
ItemPriceService
(Service)
ItemPriceDiscounted
(Port)
ItemPriceDiscountedService
SOAP Endpoint
ItemPriceDiscountedService
(Service)
Figure 12-3 ItemPrice and ItemPriceDiscounted services use the same PortType
Users provide name of item and type of customer (Gold or General) to query the
price of item. We use another interface ItemPriceEnquiry to receive request
from users. See Figure 12-4.
457
12.2 Requirements
The solution requirements are divided into Governance and ESB Runtime
categories.
Governance requirements
1. Access to the resources in the WSRR runtime environment must be restricted
such that each user is only granted the minimum level of access that they
require in order to perform their role.
2. The physical document objects that are stored in WSRR must have a suitable
lifecycle applied to them.
3. When a physical document object is loaded into WSRR, a checksum must be
calculated and added as property to the object.
458
WAS
WESB
Service
Consumer
Mediation
Module
ItemPriceService
ItemPriceDiscountedService
WSRR
459
460
13
Chapter 13.
Configuring governance
This chapter describes how to enforce the various aspects of SOA governance
that were discussed in Chapter 5, SOA governance enablers on page 157.
This chapter contains the following:
13.1, Configuring security on page 462
13.2, Using lifecycles on page 476
13.3, Developing custom plugins on page 482
13.4, Performing impact analysis on page 499
461
462
User name
Description
itcam4soa
This user is used by the IBM Tivoli Composite Application Manager for
SOA product in order to connect to WSRR.
wesb
assetmgr
wsrruser
Note: All of the example commands shown in this section specify -user and
-password parameters when invoking wsadmin. These parameters are
required because IBM-ITSO Ltd. has enabled security in their WebSphere
environment.
Also, in all of the example commands shown, <WAS_INSTALL> is the root
installation directory of WebSphere Application Server and <WSRR_INSTALL> is
the root installation directory of WebSphere Service Registry and Repository.
Finally, it is assumed that all of the example commands are executed from the
<WSRR_INSTALL>\admin\scripts directory.
463
6. Check the check box in the Select column for the Administrator role and
uncheck the check box in the All authenticated? column.
7. Click Look up users, as shown in Figure 13-2 on page 465.
464
8. Make sure that an asterisk (*) is entered in the Search String entryfield.
9. Click Search.
10.The Available list box displays the list of user names that match the specified
search string. From this list of user names, select the wasadmin user.
11.Click >>, as shown in Figure 13-3 on page 466.
465
12.The wasadmin user is now displayed in the Selected list box. Click OK.
13.The wasadmin user is now listed in the Mapped users column for the
Administrator role, as shown in Figure 13-4 on page 467.
466
14.Click OK.
15.Save the changes and synchronize them with the nodes.
16.For the changes to become effective, you must restart the application server
on which WSRR is running.
467
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f removePrincipalFromRole.jacl
VirtualPrincipal.AllAuthenticatedUsers
Administrator
Note: VirtualPrincipal.AllAuthenticatedUsers must be specified as the
principal in order to remove the AllAuthenticatedUsers special subject. Simply
specifying AllAuthenticatedUsers will have no effect on the role mapping.
In order to add the wasadmin user to the Administrator role in the WSRR
Authorization component, execute the command shown in Example 13-2.
Example 13-2 Command to map the wasadmin user to the Administrators role
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPrincipalToRole.jacl
wasadmin
Administrator
The modifications to the role mappings in the WSRR Authorization component
must be persisted in order for them to become effective. In order to do this,
execute the command shown in Example 13-3.
Example 13-3 Command to persist the WSRR role mappings
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f persistRoleMappings.jacl
468
WSRR and map the relevant user to these roles. The roles that IBM-ITSO Ltd.
need to define are shown in Table 13-2.
Table 13-2 New roles required by IBM-ITSO Ltd.
Role name
Description
SOAInfrastructure
LifecycleManager
In order to add these roles to the WSRR Authorization component, execute the
commands shown in Example 13-4.
Example 13-4 Commands to add the required roles
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addRole.jacl
SOAInfrastructure
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addRole.jacl
LifecycleManager
The modifications to the role mappings in the WSRR Authorization component
must be persisted in order for them to become effective. In order to do this,
execute the command shown in Example 13-3 on page 468.
469
roles to access the same set of target objects, each role must also be explicitly
granted access to the set of objects.
IBM-ITSO Ltd. require that the permissions for all WSRR users provide them with
the minimum level of access that they need in order to perform their role. Given
the behavior described previously, in order to achieve this they will first need to
grant the Administrator role the permission to perform any action on any object in
WSRR. This will implicitly deny all other roles the permission to perform these
actions. They can then selectively grant permissions to each role to allow the
required level of access for that role.
The permissions required by each of the roles in the IBM-ITSO Ltd. SOA
environment are shown in Table 13-4 on page 475.
Table 13-3 IBM-ITSO Ltd. permissions
WSRR action
Administrator
LifecycleManager
SOAInfrastructure
srrCreate
srrRetrieve
srrUpdate
srrDelete
srrTransition
srrManageGov
User
The sections that follow describe the commands that need to be executed in
order to add the required permissions to each of the roles.
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPermissionToRole.jacl
Administrator
srrCreate
IBMITSOAdministratorCreatePermission
/WSRR/BaseObject
470
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPermissionToRole.jacl
Administrator
srrRetrieve
IBMITSOAdministratorRetrievePermission
/WSRR/BaseObject
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPermissionToRole.jacl
Administrator
srrUpdate
IBMITSOAdministratorUpdatePermission
/WSRR/BaseObject
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPermissionToRole.jacl
Administrator
srrDelete
IBMITSOAdministratorDeletePermission
/WSRR/BaseObject
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPermissionToRole.jacl
Administrator
srrTransition
IBMITSOAdministratorTransitionPermission
/WSRR/BaseObject
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
471
-f addPermissionToRole.jacl
Administrator
srrManageGov
IBMITSOAdministratorManageGovPermission
/WSRR/BaseObject
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f persistPolicy.jacl
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPermissionToRole.jacl
LifecycleManager
srrRetrieve
IBMITSOLifecycleManagerRetrievePermission
/WSRR/BaseObject
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPermissionToRole.jacl
LifecycleManager
srrUpdate
IBMITSOLifecycleManagerUpdatePermission
/WSRR/BaseObject
472
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPermissionToRole.jacl
LifecycleManager
srrTransition
IBMITSOLifecycleManagerTransitionPermission
/WSRR/BaseObject
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPermissionToRole.jacl
LifecycleManager
srrManageGov
IBMITSOLifecycleManagerManageGovPermission
/WSRR/BaseObject
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPermissionToRole.jacl
SOAInfrastructure
srrRetrieve
IBMITSOSOAInfrastructureRetrievePermission
/WSRR/BaseObject
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
473
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPermissionToRole.jacl
SOAInfrastructure
srrUpdate
IBMITSOSOAInfrastructureUpdatePermission
/WSRR/BaseObject
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPermissionToRole.jacl
User
srrRetrieve
IBMITSOUserRetrievePermission
/WSRR/BaseObject
474
in the User role to perform any updates of objects in WSRR and so this
permission must be removed. In order to remove this permission from the User
role, execute the command shown in Example 13-10.
Example 13-10 Command to remove the GovernedUserUpdatePermission permission
from the User role
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f removePermissionFromRole.jacl
GovernedUserUpdatePermission
User
Mapped users
Administrator
wasadmin
User
AllAuthenticatedUsers
SOAInfrastructure
itcam4soa
wesb
LifecycleManager
assetmgr
Note that the Administrator and User roles are just shown for completeness. The
wasadmin user was mapped to the Administrator in 13.1.2, Removing the
AllAuthenticatedUsers principal from the WSRR Administrator role on page 467.
The AllAuthenticatedUsers special subject was mapped to the User role during
WSRR installation.
In order to map the relevant users to the new roles in the WSRR Authorization
component, execute the commands shown in Example 13-11 on page 476.
475
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPrincipalToRole.jacl
itcam4soa
SOAInfrastructure
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPrincipalToRole.jacl
wesb
SOAInfrastructure
<WAS_INSTALL>\wsadmin.bat
-user wasadmin
-password passw0rd
-wsadmin_classpath <WSRR_INSTALL>\ServiceRegistryClient.jar
-f addPrincipalToRole.jacl
asssetmgr
LifecycleManager
476
WSRR, how the lifecycle state of an object can by transitioned from one state to
another and how you can stop applying a lifecycle to an object.
All of these tasks can be performed using both the WSRR Web UI or the
Governance API. However, the sections that follow only describe how to perform
these tasks using the Web UI. For more information about performing these
tasks using the Governance API, refer to the Governance application
programming section of the WebSphere Service Registry and Repository
Information Center:
http://publib.boulder.ibm.com/infocenter/sr/v6r0/topic/com.ibm.sr.doc/t
wsr_mansrvce_programmingguide_1_502.html
These tasks are not described within the context of a scenario. We simply
describe the steps that need to be performed in order to achieve the tasks. The
following chapters may refer to these instructions when asking you to perform the
relevant actions in the context of the scenario for that chapter.
477
7. Select a suitable transition from the Initial state transitions list. When using
the WSRR default lifecycle, only the Default transition is available.
8. Click Make Governable.
9. The WSDL document is made governable. During this process a
GovernanceRecord is created and the object is added to its list of governed
objects. The object is also classified using the relevant initial state for the
lifecycle in question. Figure 13-6 on page 479 shows the governance panel
for the ItemPrice.wsdl WSDL document after making it governable. Notice
that the Governance State for the object is Created. This is initial state for
the WSRR default lifecycle.
478
479
7. The lifecycle state of the WSDL document is transitioned to the relevant state.
In the example shown, the WSDL object is originally in the Created state. In
the default lifecycle, the only transition from that is available from this state is
the Plan transition. Performing this transition moves the WSDL document
from the Created state to the Model state, as shown in Figure 13-8 on
page 481.
480
Note: When using the default lifecycle, it is not always possible to transition an
object back to a previous state in the lifecycle. This is due to the fact that some
states only have transitions defined that move objects forwards in the lifecycle.
Refer to 5.2.3, WSRR default lifecycle on page 163 for more information
about the transitions that are possible in the WSRR default lifecycle.
481
6. Governance is removed from the WSDL document. That is, the WSDL
document no longer has a lifecycle applied to it. During this process the
GovernanceRecord associated with the WSDL document is deleted. The
governance panel is updated to reflect the fact that the WSDL document is no
longer governed, as shown in Figure 13-5 on page 478.
Note: Governance can only be removed from the root object of a governance
collection. Attempting to remove governance from any non-root object in the
governance collection will result in an error. It is possible to navigate from an
object in the governance collection to the root object of the governance
collection. This can be done by selecting the Root governance record link on
the Governance tab of the non-root object.
482
ServiceRegistryValidator
ServiceRegistryGovernanceValidator
ServiceRegistryNotifier
ServiceRegistryGovernanceNotifier
483
484
485
486
Note: The value of the CustomerType property that is added to the WSDLPort
objects is an empty string. IBM-ITSO Ltd. administrators still need to manually
specify the correct value of this property in order to ensure that service
requests are routed correctly.
The sections that follow describe the implementation of this notifier. The full
source code for this notifier can be found in the <ADD_MATS>\ITSO\WSRR\src
directory, where <ADD_MATS> is the directory where you extracted the additional
materials for this redbook.
487
488
489
The first thing that the checkWSDLPorts method does is to ensure that the
reference to the WSRR API session EJB is initialized. This lazy initialization of
the EJB reference avoids the infinity loop issue discussed in 5.4, WSRR plugins
on page 197.
The checkWSDLPorts method then needs to execute a query to obtain all of the
WSDLPorts that were created as a result of creating or updating the
WSDLDocument. WSRR provides a set of predefined queries that can be used
to run common queries. The getWSDLDocPorts query returns the list of
WSDLPort objects for a given WSDLDocument. For the full list of predefined
queries that are available in WSRR, see the WebSphere Service Registry and
Repository Information Center:
http://publib.boulder.ibm.com/infocenter/sr/v6r0/topic/com.ibm.sr.do
c/programguide63.html
The checkWSDLPorts method iterates over the list of WSDLPort objects that was
returned by the query and checks each one for the existence of the
CustomerType property.
Example 13-17 checkWSDLPorts method
490
491
492
7. Click OK.
8. Save the changes and synchronize them with the nodes.
493
4. Click Add.
5. Select ITSO_WSRR_Plugins in the Library name drop down list, as shown
in Figure 13-11.
6. Click OK.
7. Save the changes and synchronize them with the nodes.
8. For the changes to become effective, you must restart the application server
on which WSRR is running.
494
<WASPATH>\bin\wsadmin
-wsadmin_classpath <WSRRPATH>\ServiceRegistryClient.jar
-f retrieveConfiguration.jacl
ValidationProperties
PLUGIN_PROPERTIES
true
validation.properties
Note: The command shown in Example 13-19 must be entered on a single
line of the command window.
3. The validation configuration properties file will be retrieved from WSRR and
written to the validation.properties file.
495
<WASPATH>\bin\wsadmin
-wsadmin_classpath <WSRRPATH>\ServiceRegistryClient.jar
-f updateConfiguration.jacl
.
validation.properties
ValidationProperties
PLUGIN_PROPERTIES
true
Note: The command shown in Example 13-21 must be entered on a single
line of the command window.
496
Filepath
Filename
Configuration name
Configuration type
System configuration
<WASPATH>\bin\wsadmin
-wsadmin_classpath <WSRRPATH>\ServiceRegistryClient.jar
-f retrieveConfiguration.jacl
NotificationProperties
PLUGIN_PROPERTIES
true
notification.properties
497
498
<WASPATH>\bin\wsadmin
-wsadmin_classpath <WSRRPATH>\ServiceRegistryClient.jar
-f updateConfiguration.jacl
.
notification.properties
NotificationProperties
PLUGIN_PROPERTIES
true
Note: The command shown in Example 13-24 must be entered on a single
line of the command window.
Filepath
Filename
Configuration name
Configuration type
System configuration
499
ItemPricePortType
WSDL
import
import
ItemPrice
ItemPriceDiscounted
WSDL
WSDL
500
8. Click OK.
9. The results are shown in Figure 13-14 on page 502.
501
502
8. Click OK.
9. The results are shown in Figure 13-16.
503
4. Relationship name
For the results shown in Figure 13-16 on page 503, this would interpreted as:
ItemPricePortType.wsdl is depended on by ItemPriceDiscounted.wsdl
via the importedWsdls relationship.
ItemPricePortType.wsdl is depended on by ItemPrice.wsdl via the
importedWsdls relationship.
ItemPrice
WSDLPortType
getPrice
WSDLOperation
getPriceRequest
getPriceResponse
WSDLMessage
WSDLMessage
parameters
WSDLPart
getPrice
getPriceResponse
ElementDeclaration
ElementDeclaration
504
505
8. Click OK.
9. The results are shown in Figure 13-19.
506
507
7. To determine which port type this operation was defined in, we must
determine the inbound dependencies for the getPrice WSDLOperation.
Therefore, check the Include entities that depend on this entity check box.
8. The modelled relationships that can be specified when performing impact
analysis on WSDLOperation objects are described in Table 5-16 on page 231.
To determine which input messages the getPrice WSDLOperation defines,
select WSDL operation to input WSDL message from the Built-in
relationships list box.
9. To determine which output message the getPrice WSDLOperation defines,
select WSDL operation to output WSDL message from the Built-in
relationships list box.
10.To determine which port type the getPrice WSDLOperation was defined in,
select WSDL port type to WSDL operation from the Built-in relationships
list box, as shown in Figure 13-20.
Figure 13-20 Analyzing inbound and outbound dependencies for derived objects
11.Click OK.
12.The results are shown in Figure 13-21 on page 509.
508
509
510
14
Chapter 14.
511
14.1 Introduction
This chapter describes the use of WebSphere Service Registry and Repository
in an Enterprise Service Bus (ESB) environment, using WebSphere Enterprise
Service Bus (WESB) as the ESB implementation. Use of WSRR allows ESB
mediations that interact with some set of endpoint services to be more tolerant of
changes within the environment. This is enabled by the ESB using WSRR as a
dynamic lookup mechanism, providing information about service endpoints (the
service metadata). So, when changes occur in the service endpoint environment,
the associated ESB mediations do not have to change.
The interaction between WESB and WSRR is provided by a new primitive
introduced in WESB V6.0.2 called the Endpoint Lookup primitive.
This primitive can be used when building Mediation flows in WESB. It can call
WSRR to fetch service metadata and has caching mechanism to improve the
efficiency of the interaction.
Section 14.5, Endpoint Lookup mediation primitive on page 525 includes more
information about this new primitive and how it works.
512
Messaging:
MQ
Interoperability
Clients:
C++
Client
JMS 1.1
.Net
Client
WebSphere
Integration
Developer
XSLT
Web
Services:
Message
Logger
Mediation
Function
Message
Router
DB
Lookup
SOAP/
HTTP
WebSphere
Adapter
Support
SCA
Programming
Model:
SCA
SOAP/
JMS
WS-*
UDDI
Registry 3.0
SMO
SDO
513
514
Term
Explanation
Mediation
Mediation module
Export
Stand-alone reference
Import
Binding
Interface
Term
Explanation
Operation
Partner reference
Wire
Mediation flow
Mediation primitive
Business object
515
516
For each export and import, an interface needs to be specified. Each interface
has multiple operations, which in turn can have multiple input and output
parameters that are associated with either simple data types or business objects.
Every export and import has to be associated with a binding. A binding identifies
a specific type of invocation for a service consumer or provider. WebSphere
Enterprise Service Bus supports several bindings:
Web Service bindings
Web Service bindings allow you to access Web services.
The supported protocols are SOAP/HTTP and SOAP/JMS.
SCA bindings
SCA bindings connect SCA modules to other SCA modules.
SCA bindings are also referred to as default bindings.
Java Message Service (JMS) 1.1 bindings
JMS bindings allow interoperability with the WebSphere Application
Server default messaging provider.
JMS can exploit various transport types, including TCP/IP and HTTP(S).
The JMS Message class and its five subtypes (Text, Bytes, Object,
Stream, and Map) are automatically supported.
WebSphere MQ JMS bindings
WebSphere MQ JMS bindings allow interoperability with WebSphere MQ
based JMS providers.
517
518
519
520
The Fail primitive throws an exception and terminates the path through the
mediation flow.
The Stop primitive silently terminates the path through the mediation flow.
The Custom Mediation primitive allows the user to implement their own
mediate method using Java. The Custom mediation, like the other primitives,
receives a Service Message Object and returns a Service Message Object. It
can be used to perform tasks that cannot be performed by using the other
mediation primitives.
The Endpoint Lookup primitive dynamically routes the messages to
appropriate service endpoints. The primitive searches for service information
in WebSphere Service Registry and Repository. See section 14.5, Endpoint
Lookup mediation primitive on page 525 for more details.
The Event Emitter Mediation primitive emits business events from within a
mediation flow, if an event occurs.
The Message Element Setter primitive can be used to set the contents of
messages.
Mediation primitives have three types of terminal:
In terminal: All mediation primitives have an in terminal that can be wired to
accept a message.
Out terminal: Most mediation primitives have one or more out terminals that
can be wired to propagate a message (exceptions are the stop and the fail
primitive).
Fail terminal: If an exception occurs during the processing of an input
message, then the fail terminal propagates the original message, together
with any exception information.
521
The types of messages that are handled by WebSphere Enterprise Service Bus
include:
The SMO model is extensible so it can support other message types in the
future, such as COBOL structures. SMO extends SDO with additional information
to support the needs of a messaging subsystem.
SMO structure
All SMOs have the same basic structure, defined by an XML schema. An SMO
has three major sections:
The body contains the application data (payload) of the message, particularly
the input or output values of an operation.
The headers contain the information relevant to the protocol used to send the
message.
The context covers the data specific to the logic of a flow or failure
information.
Figure 14-6 on page 523 shows a sample SMO when calling the ItemPrice
service which is used later in this chapter.
522
Data section
The data that is carried in the SMO body is the operation that is defined by the
interface specification and the inputs/outputs/faults that are specified in the
message parts set in the business object definition (Figure 14-7 on page 524).
523
Context section
The context includes the correlation and transient context information.
Correlation is used to maintain data across a request/response flow, while
transient maintains data only in one direction. Both of these contexts are used to
pass application data between mediation primitives. They are described as
business objects, which contain XML schema that are described data objects
and that are specified on the mediation flows input node properties.
The context includes the failInfo, which is added to the SMO when a fault
terminal flow is used. The information that is provided includes the
failureString (nature of the failure), origin (mediation primitive in which the
failure occurred), invocationPath (the flow taken through the mediation) and
predecessor (previous failure).
It also includes primitiveContext, which are used by primitives. EndpointLookup
primitive uses primitiveContext to adds zero or more EndpointLookupContext
to store service endpoints. See Figure 14-6 on page 523. In the future more
primitives will use primitiveContext to store context information.
Header section
The header section of a SMO contains the following supplemental information:
524
SMO manipulation
During the execution of mediation flows the active mediation primitives can
access and manipulate the SMO. There are three different ways to access
SMOs:
XPath V1.0 expressions
Many mediation primitives have a property called Root that contains an XPath
1.0 expression. The XPath expression represents the root of the current
mediation. Typically, you can specify: /, /body, /headers, or your own XPath
expression. / refers to the complete SMO, /body refers to the body section of
the SMO, /headers refers to the headers of the SMO. If you specify your own
XPath expression then the part of the SMO you specify is processed.
XSL stylesheets
Used by the XSLT mediation primitive and are the common way to modify the
SMO type within a flow. It can also be used to modify the SMO without
changing the type (using XSLT function and logical processing with XSL
choose statements).
Java code
Using the Custom Mediation primitive, you can access the SMO either using
the generic DataObject APIs (commonj.sdo.DataObject, which is loosely
typed) or the SMO APIs (com.ibm.websphere.sibx.smobo, strongly typed).
525
The Endpoint Lookup mediation primitive lets you retrieve service endpoint
information that relates to the following:
Web services using SOAP/HTTP.
Web services using SOAP/JMS.
Mediation module exports with Web service bindings, using SOAP/HTTP.
Mediation module exports with Web service bindings, using SOAP/JMS.
Mediation module exports with the default SCA binding.
When the Endpoint Lookup mediation primitive receives a message it sends a
search query to the registry. The search query is constructed using the Endpoint
Lookup properties that you specify and the query might return nothing, or might
return one or more service endpoints. You can choose whether to be informed of
all endpoints that match your query, or just one endpoint that matches your
query.
The Endpoint Lookup mediation primitive has one input terminal and three output
terminals. The input terminal is wired to accept a message and the output
terminals are wired to propagate a message. One of the output terminals is for
failure output. If an exception occurs during the processing of the input message,
then the fail terminal propagates the original message, together with any
exception information. If service endpoints are retrieved from the registry then
the out terminal propagates the original Service Message Object (SMO) modified
by the service endpoint information. If no services are retrieved from the registry
then the noMatch terminal propagates an unmodified message.
The Endpoint Lookup primitive as represented in the Mediation Flow Editor in
WebSphere Integration Developer is shown in Figure 14-8.
Note: In order for the runtime to implement dynamic routing on a request, you
must set the Use dynamic endpoint property in the callout node. Optionally,
you can specify a default endpoint that the runtime uses if it cannot find a
dynamic endpoint. You specify a default endpoint by wiring an import that has
the default service selected.
526
If you specify an endpoint Match Policy of Return one matching endpoint, and
your registry query returns matches, then the dynamic callout address in the
SMO header is updated with one service address and the SMO context is
updated with registry information relating to that service.
If you specify an endpoint Match Policy of Return all matching endpoints, and
your registry query returns matches, then the SMO context is updated with
registry information relating to all services returned by the registry. The dynamic
callout address in the SMO header is not updated. Therefore, you need to
post-process the SMO to select a service endpoint.
The SMO context contains a primitiveContext element that is used for storing
state information. The Endpoint Lookup mediation primitive uses an element
within the primitiveContext, called EndpointLookupContext, to store the results
of WSRR queries. A number of service endpoints can be stored within the SMO
context. If you specify a Match Policy of Return one matching endpoint then the
Endpoint Lookup mediation primitive updates the SMO header at
/headers/SMOHeader/Target/address.
If you specify a Match Policy of Return all matching endpoints then you must
wire the Endpoint Lookup mediation primitive to another mediation primitive that
decides which endpoint to use, and moves endpoint information from the SMO
context to /headers/SMOHeader/Target/address.
527
14.5.2 Usage
You can use the Endpoint Lookup mediation primitive to dynamically route
messages based upon customer classification. For example, you might want
messages for customers of type A routed to URL X, and messages for customers
of type B routed to URL Y. If you set up your registry to key URLs against
customer types, then you can dynamically route customer requests according to
customer type.
You can use the Endpoint Lookup mediation primitive, together with other
mediation primitives, to add security to dynamic routing. For example, you could
use the Endpoint Lookup, Message Filter and XSLT mediation primitives to check
whether an endpoint was external or internal, and remove any internal
information from public messages. To do this you might wire the matching output
terminal of the Endpoint Lookup mediation primitive to the input terminal of the
Message Filter mediation primitive. You could then use the Message Filter
mediation primitive to check whether the URL was internal or external, and route
external messages to the XSLT mediation primitive: wire one of the Message
Filter output terminals to the XSLT mediation primitive. Lastly, you could use the
XSLT mediation primitive to remove private information from messages.
14.5.3 Properties
The Endpoint Lookup primitive fetches service metadata from WSRR based on
the properties specified in the primitive.
There are advanced properties which let you specify Classification and User
Properties. This enables you to search for objects that match a particular
classification. Also, you can search the registry for services that are annotated
with user defined properties. See Figure 14-10 on page 529.
528
The properties of the Endpoint Lookup primitive are described in Table 14-2 and
Table 14-3 on page 531. Refer to Figure 14-9 on page 527 and Figure 14-10 for
screen captures of the Endpoint Lookup primitive property pages in WebSphere
Integration Developer.
Table 14-2 Endpoint Lookup mediation primitive properties
Property
Description
Registry Name
529
Property
Description
Match Policy
If the registry has more than one service matching your query,
then the Match Policy determines how many service
endpoints should be added to the message. Specify Return
one matching endpoint to add only one match, and specify
Return all matching endpoints to add all matches. If you
choose a Match Policy of Return one matching endpoint
then the Endpoint Lookup mediation primitive selects the first
service returned from the registry. If you choose a Match
Policy of Return all matching endpoints then, typically, you
would wire the match output terminal of the Endpoint Lookup
to another mediation primitive. This is because if multiple
endpoints are returned, the SMO context is updated but the
dynamic callout address in the SMO header is not updated.
Therefore, you need to post-process the SMO to select a
service endpoint.
PortType Name
PortType Namespace
PortType Version
User Properties
Search the registry for services that are annotated with user
defined properties.
Name
The name of the user defined property.
Type
The type of the user defined property. If the type is String then
what you specify as the Value is used as a literal, in the search
query. If the type is XPath then what you specify as the Value
must be an XPath expression. The XPath expression must
resolve to a unique leaf node in the inbound SMO. The value
of the leaf node is used in the search query.
Value
The value of the user defined property. This can be either a
literal value or an XPath expression, depending upon the Type
property.
530
Property
Description
Classification
Table 14-3 describes valid and default values for the properties of the Endpoint
Lookup primitive.
Table 14-3 Endpoint Lookup mediation primitive properties valid values and defaults
Property
Valid Values
Default
Registry Name
String
Match Policy
One
PortType Name
String
PortType Namespace
String
PortType Version
String
String
String or XPath
Dependent on Type
Classification
List of URIs
531
14.5.4 Considerations
Consider the following when using the Endpoint Lookup mediation primitive:
If the Use dynamic endpoint property is not set in the callout node, then the
runtime will not use the dynamic endpoint in
/headers/SMOHeader/Target/address. In this case, the runtime uses the
default endpoint if there is one, or throws an error.
It is valid to specify no properties for an Endpoint Lookup mediation primitive,
other than the Match Policy. In this case, the default registry will be queried
for all applicable services.
You can use WSDL Web services loaded into the WSRR registry as a WSDL
file, or as a mediation module with an export using the Web service binding.
In either case, the Endpoint Lookup mediation primitive will search the
registry for WSDL Port objects that implement a PortType described by the
PortType properties. Any Classification or User properties specified on the
Endpoint Lookup need to be defined on the WSDL Port object within the
registry.
In the case of mediation modules that include an export using the default SCA
binding, the Endpoint Lookup mediation primitive searches the registry for
SCA Export objects that implement a PortType described by the PortType
properties. Any Classification or User properties specified on the Endpoint
Lookup need to be defined on the SCA Export object within the registry.
All PortType, Classification or User properties specified for an Endpoint
Lookup mediation primitive result in a query that combines all of these
properties using a logical AND.
If you want to use Classification URIs that include white space characters,
the correct URL encoding should be used. For example, a single character
space should be represented as %20.
White space characters provided in any of the Endpoint Lookup mediation
primitive properties will be treated as literal characters. They are not removed
by the Endpoint Lookup mediation primitive when querying the registry. For
example, if you specify a Classification property and the expected results
are not returned from a query, ensure there is no white space before or after
the Classification URI.
532
The URI format in the general Web service case, (when a Web service is not
implemented by an export with a Web service binding), is as follows:
http://<host>:<port>/<service>
Consider the example WSDL in Example 14-1.
Example 14-1 SOAP/HTTP example WSDL
533
534
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SOAP_JMSExport_BigEchoJmsService">
<wsdl:port name="SOAP_JMSExport_BigEchoJmsPort"
binding="this:SOAP_JMSExport_BigEchoJmsBinding">
<soap:address
location="jms:/queue?destination=jms/SOAP_JMSExport&;connectionFactory=
jms/SOAP_JMSExportQCF&;targetService=SOAP_JMSExport_BigEchoJmsPort"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
535
536
537
This panel provides a list of WSRR definitions that have been created. To browse
or change the properties of a listed item, select its name in the list. You should
then see the detail view for the WSRR definition, as shown in Figure 14-13.
538
Timeout of cache
This value sets the time (in seconds) after which the WSRR cache expires
and will be refreshed
The WSRR cache is used to maximize the performance of registry lookups.
There is one WSRR cache for each server, used to store services requested
by mediation modules on the server.
If a mediation module requests a new registry lookup, the service returned is
added to the cache and the timeout period started for that lookup. During the
timeout period, any more requests for the same lookup retrieve the service
from the cache. After the timeout period has expired, the next time the same
lookup is requested, the service is retrieved from the registry and refreshed in
the cache, and the timeout is reset.
The timeout for a lookup request is defined in the WSRR definition that the
mediation module uses for that request. Modules can use different WSRR
definitions that each define a different cache timeout for lookup requests.
If you want to clear the WSRR cache for a server, restart the server.
Connection type
This selects the type of connection for this WSRR definition
The connection type is set when the registry definition is created, and cannot
be altered. Currently, the only implemented choice is Web Service.
539
Registry URL
This is the URL to be used to connect to the WSRR Web service
Default: http://localhost:9080/WSRRCoreSDO/services/WSRRCoreSDOPort
If you want modules to use a WSRR Web service application on another
server or port number, change the server:port_number values in this URL.
If you are connecting to a secure WSRR, use https instead of http.
For example
https://ITSO-WSRR:9443/WSRRCoreSDO/services/WSRRCoreSDOPort
Authentication alias
This is the alias to be used to authenticate with the WSRR Web service if
security is enabled in WSRR.
The authentication alias corresponds to a user name and password that are
used for authentication.
You can use the list to select one of the existing WebSphere authentication
aliases. Otherwise, you can use the Other, please specify option in the list to
type another alias that you later define as a WebSphere authentication alias.
You can list and define WebSphere authentication aliases on the J2EE
Connector (J2C) authentication data entries panel - Security Global
security [Authentication] JAAS Configuration J2C Authentication
data.
540
4. Either use the default repertoire or create a new one to use the appropriate
keystore and truststore. Note down the name of repertoire.
5. Create a namespace binding in the admin console.
Select Environment Naming Name Space Bindings.
Ensure that your scope is Server level. Click New (as highlighted in
Figure 14-16 on page 542).
541
6. See Figure 14-17 on page 543 for an example of the basic properties screen.
Select String from the list of Binding Types. Click Next.
7. In the field BInding Identifier, enter: myRepertoire
8. In the field Name in Name Space, enter: esb/endpointLookup/repertoire
9. In the field String Value, enter the name of repertoire you noted in step 4 on
page 541.
542
543
IBM-ITSO Ltd uses a WSDL Port Type ItemPrice to describe the Interface
(Figure 14-18).
The ItemPriceService returns the normal price and is meant for General
customers. The ItemPriceDiscountedService returns the discounted price and
will serve Gold customers. Both services use the ItemPrice PortType but have
different endpoints.
WebSphere Application
Server
WESB
Service
Consumer
Mediation
Module
ItemPriceService
ItemPriceDiscountedService
WSRR
544
14.7.2 Scenarios
There are three integration scenarios between WESB and WSRR
1. Only one service. The service endpoint is in WSRR and WESB retrieves it.
This is most basic scenario. In this scenario, we use just one service. We
publish service metadata for only the ItemPriceService in WSRR.
We design a WESB Mediation Module to fetch metadata from WSRR for all
services that are using the ItemPrice port type. Since there is only one such
service available in WSRR, it will be retrieved. WESB then uses this retrieved
information to call the service.
2. There are 2 services. The service endpoints are in WSRR and WESB fetches
only one based on a User property.
In this case, we publish the metadata in WSRR for both services
(ItemPriceService and ItemPriceDiscountedService). We create a custom
property CustomerType in WSRR.
We design a WESB Mediation Module to fetch metadata from WSRR for all
services that are using the ItemPrice port type and have a user defined
property CustomerType with a given value. Since there is only one such
service available in WSRR, it will be retrieved. WESB then uses this retrieved
information to call the service.
3. There are 2 services. The service endpoints are in WSRR. WESB fetches
both and the custom mediation decides which one to use.
In this case, we publish the metadata in WSRR for both services
(ItemPriceService and ItemPriceDiscountedService). We create a custom
property CustomerType in WSRR.
We design a WESB Mediation Module to fetch, from WSRR, metadata for all
services that are using the ItemPrice port type. Since there are two such
services available in WSRR, both will be retrieved. WESB then uses an
additional primitive to choose between them and calls the service.
14.7.3 Setup
We used three physical machines for our WESB and WSRR integration
scenarios. All the boxes are running on Windows 2003 Server Service Pack 1.
Here are the details of the three boxes:
1. WID Server (ITSO-WESB) - It has WID V6.0.2 with the WESB 6.0.2
EmbeddedRuntime installed. It is used for development and deployment of
the Mediation module.
2. WSRR server (ITSO-WSRR) - It has WSRR V6.0.0.1 installed.
545
3
1
Service
Consumer
ITSO-WESB
WID v6.0.2
W-ESB v6.0.2
ITSO-WMB
ITSO-WSRR
You do not need to have three machines to try these scenarios. You can install
these products on one or two machines depending on availability.
Note: Download the additional material for this redbook and extract it to some
suitable location, for example, C:. This path is referred as <lab-files> in the
remaining sections. See Appendix B, Additional material on page 877 for
details.
546
547
548
In the Local File System - Specify path field click the Browse button (see
Figure 14-23). Select the
<lab-files>\ITSO\WSRR\WESB\WebServices\ItemPriceApp.ear file and click
Next.
Leave all the options as defaults and click the Next button on the next four
screens. Click the Finish button on the final screen.
Ensure that you get a message saying Application ItemPriceApp
installed successfully on the results page. Click the Save to Master
Configuration link and then click the Save button to save the changes to the
repository.
549
Click Enterprise Applications in the navigation tree. You should see a list of
installed applications similar to Figure 14-24. Ensure that ItemPriceApp is
there in the list of Application names. Select the ItemPriceApp application by
checking the check box next to it. Click the Start button in the top menu to
start the application.
550
Click the ItemPriceApp application link to see the details. You should then see
a screen similar to Figure 14-25. Under Additional Properties on the right,
click the Publish WSDL files link.
551
Extract the zip file to the same folder and you should have a structure similar
to that shown in Figure 14-27.
Now you should have WSDL files for both services as shown in Figure 14-28.
Open each WSDL and examine the contents.
552
Note: We are using split WSDL for our scenario. There are two Web
services and there are two WSDLs for each service. One WSDL contains
the Port Type (ItemPricePortType.wsdl) and other one is for the service
and binding details.
Example 14-4 shows the Port Type defined in the ItemPricePortType.wsdl
WSDL file which can be found in the folder:
<lab-files>\ITSO\WSRR\WESB\WSDLs\ItemPriceApp.ear\ItemPriceWeb.war\W
EB-INF\wsdl
Notice that the name of the Port Type is ItemPrice.
Example 14-4 ItemPricePortType.wsdl
553
<wsdl:message name="getPriceRequest">
<wsdl:part element="impl:getPrice" name="parameters"/>
</wsdl:message>
<wsdl:portType name="ItemPrice">
<wsdl:operation name="getPrice">
<wsdl:input message="impl:getPriceRequest"
name="getPriceRequest"/>
<wsdl:output message="impl:getPriceResponse"
name="getPriceResponse"/>
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>
Example 14-5 shows the binding and the service defined in the
ItemPrice.wsdl WSDL file. Notice that the endpoint address is
http://ITSO-WMB:9080/ItemPriceWeb/services/ItemPrice.
Example 14-5 ItemPrice.wsdl
554
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Examine the contents of folder
<lab-files>\ITSO\WSRR\WSDLs\ItemPriceApp.ear\ItemPriceDiscountedWeb.
war\WEB-INF\wsdl also. Notice that the endpoint address is
http://ITSO-WMB:9080/ItemPriceDiscountedWeb/services/ItemPriceDiscou
nted.
555
Click the Load document button on top menu as highlighted in Figure 14-31.
556
In the Local file system field (see Figure 14-32), click the Browse button and
select
<lab-files>\ITSO\WSRR\WSDLs\ItemPriceApp.ear\ItemPriceWeb.war\WEB-IN
F\wsdl\ItemPricePortType.wsdl.
In the Enter document description field, enter:
WSDL Port Type for ItemPrice service
557
Click OK to complete the loading of the Port Type. You should then see a
confirmation message as shown in Figure 14-33.
558
Click the Content tab and review the contents. Notice that you can see WSDL
Port Type for your service (see Figure 14-34).
Come back to the Details tab and review other the sections given under the
headings Additional Properties and Relationships.
Load another WSDL document with service and binding details. Click Service
Documents WSDL Documents. Click the Load document button from
top menu.
559
In the Local file system field (see Figure 14-35), click the Browse button and
select
<lab-files>\ITSO\WSRR\WSDLs\ItemPriceApp.ear\ItemPriceWeb.war\WEB-IN
F\wsdl\ItemPrice.wsdl.
In the Enter document description field, enter: WSDL Service for
ItemPrice service
560
561
562
Alternatively, you can select ports from left side navigation tree. Select
Service Metadata WSDL Ports after loading the WSDL document (as
highlighted in Figure 14-39).
563
Click the ItemPrice port to see the details, as shown in Figure 14-40.
564
565
566
567
568
The next step is to create a WSRR definition in WESB so that WESB knows
which instance of WSRR to access to get the service metadata. Select the
Servers view from the stack of views at the bottom right. Select WebSphere
ESB Server v6.0 by clicking on it.
Click the Debug icon on view menu bar (circled in Figure 14-46) or right-click
WESB server and select Debug from context menu to start the WESB server
in Debug mode.
Wait for the WESB server to be started. You should get the message Server
server1 open for e-business in the console. Once it is started, right-click
WebSphere ESB Server v6.0 in the servers view again and select Run
administrative console as shown in Figure 14-47.
569
Provide the user id and click Log in. From the navigation tree on the left,
select Service integration WSRR Definitions as highlighted in
Figure 14-48.
570
571
572
Specify the hostname or IP Address and port number of your WSRR server in
the Registry URL property (see Figure 14-52). Change http to https if you
are using a secure WSRR (see 14.6.4, Connecting to a secure WSRR on
page 541). Click OK.
If you are connecting to a WSRR instance with security enabled, you need to
perform some additional steps. Refer to 14.6, Managing access from WESB
to WSRR on page 536 and Connecting to a secure WSRR on page 541 for
more information.
573
Click the Save link to save the changes as circled in Figure 14-53.
We could add more WSRR definitions and choose which one should be the
default. There can to be only one default WSRR definition. The default WSRR
definition is used when no definition is specified in the Endpoint Lookup
primitive in the WESB Mediation Module. You can now close the WESB
Admin Console.
574
This is most basic scenario. In this scenario, we just use one service. We publish
service metadata for only the ItemPriceService to WSRR.
We design the WESB Mediation Module to fetch, from WSRR, metadata for all
services that are using the ItemPrice port type. Since there is only one such
service available in WSRR, it will be retrieved. WESB then uses this retrieved
information to call the service.
Select File New Project. Select Mediation Module and click Next, as
shown in Figure 14-55.
575
Enter the Mediation Module name: Item as shown in Figure 14-56. Leave the
other options as they are. Click Finish.
576
In the Business Integration view, select the Item module by clicking on it.
Select File Import. Select WSDL/Interface from the list of import sources
and click the Next button. In the Import from field, click the Browse button
and select the
<lab-files>\ITSO\WSRR\WSDLs\ItemPriceApp.ear\ItemPriceWeb.war\WEB-IN
F\wsdl folder. Click wsdl in the left panel. You should see the
ItemPricePortType.wsdl file in the right side panel. Select it by checking the
check box. Ensure that the Into module field has the Item module selected.
Click the Finish button. This is shown in Figure 14-57.
577
578
Click the Mediation component Mediation1. Select the Properties view (lower
right pane). Select the Description tab and change the name to
ItemPriceMediation. (See Figure 14-59)
579
580
581
Hover the mouse over getPrice operation in ItemPrice interface. When the
tip of the yellow wire can be seen, drag the wire onto getPrice operation in
ItemPricePartner reference (see Figure 14-63).
582
Click the newly created arrow. The bottom half of this editor is where the
Mediation flow will be designed. Notice that at the bottom left of the editor,
there are two tabs Request: getPrice and Response: getPrice. Ensure that
you are in the Request: getPrice tab. Right-click the getPrice: ItemPrice
callout and select Show in Properties. Select the Details tab and ensure
that the Use dynamic endpoint if set in the message header property is
checked (See Figure 14-64).
In the Mediation Flow Editor, expand the palette on the bottom-left side of
the Editor and select the Endpoint Lookup icon (see Figure 14-65).
583
Click in the middle of the Editor to drop the new Endpoint Lookup primitive.
Click the new primitive and rename it to ItemPriceLookup as in Figure 14-66.
Wire the out terminal of Input getPrice: ItemPrice to the in terminal of the
ItemPriceLookup primitive, Wire the out terminal of the ItemPriceLookup
primitive to the in terminal of Callout getPrice: ItemPricePartner as shown
in Figure 14-67.
584
585
Go to the Servers view. Right-click WebSphere ESB Server v6.0 and select
Add and remove projects. Select ItemApp from the list of Available projects
and click the Add button to add the project to the list of Configured projects
as highlighted in Figure 14-70. Click Finish.
586
587
588
589
590
591
In the Local file system field (as shown in Figure 14-77), click the Browse
button and select:
<lab-files>\ITSO\WSRR\WESB\WSDLs\ItemPriceApp.ear\ItemPriceDiscounte
dWeb.war\WEB-INF\wsdl\ItemPriceDiscounted.wsdl
In the Enter document description field, enter: WSDL Service for
ItemPriceDiscounted service
592
593
Click the ItemPriceDiscounted port to see its details (circled in Figure 14-81).
594
595
596
The new property should now be listed in the list of properties as shown in
Figure 14-85.
597
WSRR, it will be retrieved. WESB then uses this retrieved information to call the
service.
This scenario is a continuation of the previous scenario.
In the Business Integration view, select the Item module by clicking on it.
Select File Import. Select WSDL/Interface from the import source list
and click the Next button. In the Import from field, click the Browse button as
circled in Figure 14-86.
Select the <lab-files>\ITSO\WSRR\WESB\EnquiryInterfaceWSDL folder. Click
EnquiryInterfaceWSDL in the left pane. Select ItemPriceEnquiry.wsdl by
checking the check box. Ensure that the Into Folder field contains Item. Click
Finish.
598
In the Business Integration View, click the + icon to expand the Item
Module. Expand Interfaces and double-click the ItemPriceEnquiry interface
to review it. Notice that it has customerType as one of the input parameters.
(see Figure 14-87).
599
The bottom half of this editor is where the Mediation flow will be designed.
Notice that at the bottom left of the editor (Figure 14-90 on page 601), there
are two tabs Request: getPrice and Response: getPrice. Ensure that you
are in Request: getPrice tab. Right-click getPrice: ItemPrice callout and
select Show in Properties.
600
Select the Details tab and ensure that Use dynamic endpoint if set in the
message header property is checked as in Figure 14-90.
In the Mediation Flow Editor expand the palette on the bottom-left side of
the Editor and select the Endpoint Lookup icon (highlighted in
Figure 14-91). Click in the middle of the Editor to drop a new Endpoint Lookup
primitive.
601
From the palette, select the XSL Transformation icon (see Figure 14-93).
Click in the Editor to drop the new XSL Transformation primitive to the right of
the ItemPriceLookup primitive. Click the new primitive and rename it to
XSLTransformationRequest.
602
Go to the Advanced tab. This tab can be used to specify the Classifications
and User Properties to filter the service that will be returned from WSRR.
603
Click the Add button in the User Properties section to open the Add/Edit
window (highlighted in Figure 14-96).
604
In the XPath Expression Builder window, you can see the schema of the
SMO which is passed to the mediation primitive. Click the + icon of body:
getPriceRequestMsg to expand it. Click the + icon of getPrice:
_getPriceParameters_. Click customerType: string to select it (circled in
Figure 14-98).
Click the OK button. In the Add/Edit window, click Finish. Select File Save
All.
605
In the New XSLT Mapping window (Figure 14-100), leave the values as their
default values and click the Finish button.
606
607
getPriceReturn nodes. Click the source SMO getPriceReturn node (left) and
drag it onto getPriceReturn in the target SMO (right) (Figure 14-103).
608
Wait for the console to confirm with the message similar to:
ApplicationMg A
609
610
In the Initial request parameters, enter the Value for itemName: Item1. Enter
the value for customerType: Gold (Figure 14-109).Click the Continue button.
Go to the Servers view. Right-click WebSphere ESB Server v6.0 and select
Add and remove projects. Select ItemApp from the list of Configured
611
projects and click the Remove button to remove the project from the list of
Configured projects. Click Finish.
612
Click in the Editor to drop a new Custom Mediation primitive to the right of the
ItemPriceLookup primitive. Click the CustomMediation1 primitive and rename
it to EndPointSelector (Figure 14-112).
613
Select the Advanced tab. In the list of User Properties, select the
CustomerType property by clicking on it. Click the Remove button to remove
the property (Figure 14-116).
614
Select File Import. Select File system from the list of Import sources
and click the Next button. In the From directory field, click the Browse
button and select the folder <lab-files>\ITSO\WSRR\WESB\Code
(Figure 14-117).
Click the Code folder in the left panel. You should see
MyEndPointSelector.java on the right-hand side. Select it by clicking the
check box next to it.
In Into folder, enter: Item/com/ibm/itso. Click Finish.
615
The Java class has been imported but it is not visible in the Business
Integration view. If you want to see the class, you can go to another view like
the Physical Resources view (shown in Figure 14-118).
package com.ibm.itso;
import java.util.Iterator;
import java.util.List;
import
import
import
import
import
com.ibm.websphere.sibx.smobo.EndpointLookupContextType;
com.ibm.websphere.sibx.smobo.RegistryPropertyType;
com.ibm.websphere.sibx.smobo.ServiceMessageObjectFactory;
com.ibm.websphere.sibx.smobo.TargetAddressType;
commonj.sdo.DataObject;
616
617
}
}
}
}
return smo;
}
}
Review the contents of class.
Go back to the Mediation Flow Editor. Right-click the EndPointSelector
primitive and select Show in Properties. Click the Details tab and ensure
that Java is selected as the Implementation option and / is selected in the
field Root (Figure 14-119).
In the text box given, enter:
return com.ibm.itso.MyEndPointSelector.setEndPoint(input);
618
Go to the Servers view. Right-click WebSphere ESB Server v6.0 and select
Add and remove projects. Select ItemApp from the list of Available projects
and click the Add button to add the project to the list of Configured projects.
Click Finish (Figure 14-120).
Wait for the console to confirm deployment with a message similar to:
ApplicationMg A
619
620
You should see 100 as the output in Return parameters (Figure 14-123).
621
In the Initial request parameters, enter the Value for itemName: Item1. Enter
the value for customerType: Gold. Click the Continue button (Figure 14-125).
Go to the Servers view. Right-click WebSphere ESB Server v6.0 and select
Add and remove projects. Select ItemApp from the list of Configured
622
projects and click the Remove button to remove the project from the list of
Configured projects. Click Finish.
623
624
15
Chapter 15.
625
626
627
628
Channel
B2B
Service Provider
Service Components
Operational Systems
Packaged
Application
Atomic Service
Custom
Application
Composite Service
Governance
Services
Business Process
Composition; choreography;
business state machines
Service Consumer
Consumers
OO
Application
Registry
Managing services
The management of services includes service consumers and service providers.
Service consumers invoke services, while service providers expose application
functions to be consumed. For example, both a J2EE Web Services client
application (service consumer) and an session EJB Web service (service
provider) can be monitored and managed.
Some key elements of managing the services layer are listed here:
Understand how services relate to each other and to the IT infrastructure, as
well as how the service relates to the business process layer.
629
630
631
IT Process
Management
IT Process
Management Products
IT Service
Management Platform
IT Operational
Management Products
Best Practices
Figure 15-3 IBM IT Service Management
632
Security
Figure 15-4 IBM Tivoli solution stack for security, storage and system management
The complete system management solution stack offers the following features:
Resource Monitoring
Measuring and managing IT resource performance including servers,
databases, and middleware.
633
634
Candle/OMEGAMON terminology
OMEGAMON Platform
CandleNET Portal
Database
Note: Additional information about the ITCAM family of products can be found
in IBM Tivoli Composite Application Manager family products on page 872.
635
636
637
This means that a consolidated view of a composite application has been made
available through a single client.
These agents test attribute values against a threshold and report these results to
the monitoring servers. The TEP displays an alert icon when a threshold is
exceeded or a value is matched. The tests are called situations.
When a portal workspace is opened or refreshed, the TEPS sends a sampling
request to the hub TEMS. The request is passed to the monitoring agent if there
is a direct connection or through the remote TEMS to which the monitoring agent
connects. The monitoring agent takes a data sampling and returns the results
through the monitoring server and portal server to the portal workspace.
638
The sampling interval for a situation (a test taken at your monitored systems) can
be as often as once per second or as seldom as once every three months. When
the interval expires, the monitoring server requests data samples from the agent
and compares the returned values with the condition described in the situation. If
the values meet the condition, the icons change on the navigation tree.
Optionally, the agents can be configured to transfer data collections directly to
the Warehouse Proxy agent instead of using the remote TEMS. If firewall
restrictions are disabled or minimal, you should configure all the agents to
transfer directly to the Warehouse Proxy agent. Otherwise, firewall security is a
key factor in the location of the Warehouse Proxy agent respective to the firewall
zone and agents. Warehousing data through the remote TEMS is limited and
should be used only as a last resort.
Tivoli Enterprise Management Agents are grouped into two categories:
Operating system (OS) agents
Operating system agents retrieve and collect all monitoring attribute groups
related to specific operating system management conditions and associated
data.
Application agents
Application agents are specialized agents coded to retrieve and collect unique
monitoring attribute groups related to one specific application. The monitoring
groups are designed around an individual software application, and they
provide in-depth visibility into the status and conditions of that particular
application.
Common management agents packaged with IBM Tivoli Monitoring include:
Window OS Agent
Linux OS Agent
UNIX OS Agent
UNIX Log Agent
i5 OS Agent
Universal Agent
The Universal Agent is a special agent that leverages an API to monitor and
collect data for any type of software. The Universal Agent can monitor and
retrieve data from any application that produces data values. Essentially, IBM
Tivoli Monitoring can now monitor any unique application regardless of whether
the base product supports it.
Common optional management agents that are packaged separately include:
Monitoring Agent for IBM Tivoli Monitoring 5.x Endpoint
DB2 Agent
639
Oracle Agent
MS SQL Agent
MS Exchange Agent
Active Directory Agent
640
15.4.1 Overview
SOA uses the term services to describe both Web services and other services
with well defined interfaces. Because the definition of a service from an SOA
perspective is fairly broad, IBM Tivoli Composite Application Manager for SOA
defines its scope through support for the application server runtime environments
that host the services. It can monitor, manage, and control the service layer of IT
architectures while drilling down to the application or resource layer to identify the
source of bottlenecks or failures and to pinpoint services that take the most time
or use the most resources.
IBM Tivoli Composite Application Manager for SOA works in concert with other
products to support the logical services management layer in a complete SOA
management solution, and to manage the resources that support the services
and the WebSphere Enterprise Service Bus. IBM Tivoli Composite Application
Manager for SOA focusses on discovery and monitoring of services in a wide
range of application server runtime environments that are most common in early
SOA adoption projects, such as Microsoft .Net, BEA WebLogic Server, IBM
WebSphere Application Server, and others.
IBM Tivoli Composite Application Manager for SOA supports production IT
environments in key areas of operation, such as status and situation generation.
The basic control of message traffic provided by IBM Tivoli Composite
Application Manager for SOA includes the ability to log messages and the ability
to filter messages based on user-configurable criteria (computer name, service
name, operation name, and IP address of the requester).
IBM Tivoli Composite Application Manager for SOA can also process correlation
information from the message traffic to create pattern and sequence views in the
IBM Web Services Navigator, a separate tool provided with IBM Tivoli Composite
Application Manager for SOA.
IBM Tivoli Composite Application Manager for SOA provides basic control of
message traffic, including the logging of messages and filtering messages based
on criteria that you can configure (machine name, service name, operation
name, and IP address of the requester).
ITCAM is installed and operates within the management infrastructure of the
Tivoli Monitoring Services platform and the overall Enterprise Monitoring
Framework introduced in 15.3.2, IBM Tivoli Enterprise Monitoring framework on
page 636. As a result, ITCAM for SOA and the service centric management
capabilities it enables are simply considered as another perspective in the overall
multi-layered SOA management domain. The Tivoli Monitoring Services work in
conjunction with Tivoli Enterprise Portal to provide graphical views of metrics of
services calls.
641
Figure 15-6 on page 643 illustrates this integrated view of the different
management views within the IBM Tivoli Enterprise Portal.
642
Figure 15-6 Sample ITCAM for SOA workspace displayed via Tivoli Enterprise Portal
643
644
Provides basic mediation support with the ability to filter or reject Web
services call messages from a particular client or service. It can log request
and response messages for analysis.
Offers heterogeneous platform coverage:
Support for IBM WebSphere Application Server, Microsoft .NET, BEA
WebLogic
Target IBM Enterprise Service Bus and integration platforms: WebSphere
Application Server 5.x and 6.x, WebSphere Business Integration Server
Foundation 5.1.1
Displays a list of services and operations monitored in environment.
Leverages Tivoli Enterprise Portal workflow and policy editor for
threshold-triggered action sequences.
Offers the ability to include Services-layer views in Tivoli Enterprise Portal.
The context-rich views and inter-workspace linkages in the Tivoli Enterprise
Portal enables users to drill down to IT resources to identify of Web service
bottlenecks and failures. By providing built-in and extensible alerts, situations,
and workflows, users can create powerful automated mediation scenarios via the
Tivoli Enterprise Portal.
The service metrics, alerts, and automation workflows provided by ITCAM for
SOA and other Tivoli products can be displayed in the Tivoli Enterprise Portal
with the cross-workspace linkages to provide a rich and multi-layered source of
information that can help to reduce the time and skills required for problem
root-cause analysis and resolution.
ITCAM for SOA includes the Web Services Navigator, a plug-in to IBM Rational
and other Eclipse-based tools. It provides deep understanding of the service
flow, patterns, and relationships to developers and architects. The Web Services
Navigator uses data from IBM Tivoli Monitoring V6.1s Tivoli Data Warehouse or
from the ITCAM for SOA metric log files using the Log Assembler tool.
645
IBM Tivoli Composite Application Manager for SOA v6.1 provides updated
support for newer versions of the previous application server runtime
environments from v6.0, and includes support for the following features:
Support for Web services running in the IBM WebSphere Application Server
v6.1 application server runtime environment.
Support for Web services running in the Microsoft .NET Framework V2
application server runtime environment.
Support for Web services running in the JBoss V4.0.3 application server
runtime environment.
Instrumentation and monitoring support for the Service Component
Architecture (SCA) infrastructure of IBM WebSphere Process Server and IBM
WebSphere Enterprise Service Bus.
Monitoring support for Web service flows through a DataPower SOA
appliance acting as a proxy between the Web service client and server.
Support for Web services running in the SAP NetWeaver V6.40 application
server runtime environment.
Support for Web services running in the WebSphere Community Edition (CE)
application server runtime environment.
Support for Web services flowing to and from a IBM CICS Transaction Server
3.1 region running on the z/OS operating system.
The ability to launch the DataPower Web browser based user interface from a
row in the Services Inventory attributes table to configure the DataPower SOA
appliance.
The data collectors for IBM Tivoli Composite Application Manager for SOA v6.1
support these application server runtime environments with functions similar to
those environments supported in v6.0. Data from these environments are
displayed as additional environment types in Tivoli Enterprise Portal workspaces
and views.
IBM Tivoli Composite Application Manager for SOA v6.1 also introduces the
following additional capabilities for monitoring and managing services:
New Topology views in Tivoli Enterprise Portal
You can display static service relationships in a graphical topology display in
the Tivoli Enterprise Portal, and navigate through the relationships to view
and understand them. This display includes relationships between services,
service ports, operations, business processes, and the application servers
and computer systems on which they are deployed. The topology view
depends on information from several Discovery Library Adapters (DLAs),
including the WebSphere Service Registry and Repository DLA, the Business
646
Process Execution Language (BPEL) DLA, and the IBM Tivoli Composite
Application Manager for SOA DLA. This latter DLA discovers services that
have been observed by the ITCAM for SOA monitoring agents.
Integration with WebSphere Service Registry and Repository
WebSphere Service Registry and Repository Discovery Library Adapter
discovers services and static relationships between service artefacts that are
registered with WSRR. The data discovered by the DLA is displayed in the
new topology views. Integration with WSRR also includes the ability to
discover and display certain XML-based metadata files associated with a
service, and the ability to send status events to WebSphere Service Registry
and Repository when a situation is detected for a service port and operation.
Configurable mediations in WebSphere Enterprise Service Bus
Web services traffic can be monitored inside WebSphere Enterprise Service
Bus. You can track information about message interactions between Service
Component Architecture (SCA) components. Mediations are components of
WebSphere Enterprise Service Bus that can process messages and Take
Action commands, such as re-route, log, or transform a message, or create a
notification or event.
You can configure the behavior of a mediation by turning on and off managed
SCA mediation primitives in the mediation flow component. A developer can
insert one of several predefined configurable mediation primitives (shipped
with IBM Tivoli Composite Application Manager for SOA v6.1) into the wiring
of a mediation flow component using WebSphere Integration Developer. An
operator can then use IBM Tivoli Composite Application Manager for SOA
v6.1 at run time to set and change the behavior of the mediations by turning
on and off the individual primitives by name. A new workspace and
associated views display the configuration status of these primitives.
Monitor Web services in DataPower appliances
You can monitor Web services traffic through the DataPower intermediary,
which implements the proxy model for message mediation.
Note: For more information about IBM Tivoli Composite Application Manager
for SOA V6.1, see:
http://www.ibm.com/software/tivoli/products/composite-application
-mgr-soa/
647
A monitoring agent that interacts with the managed application servers and
infrastructure middleware to collect data, and store the data in a log file. The
monitoring agent consists of the following sub-components:
An Intelligent Remote Agent (IRA)
One or more Data Collectors (DCs) that are installed locally on every
application server runtime environment where services are to be
managed. The data collector is the lowest-level component of the
monitoring agent. This component is responsible for actually observing
what is happening in the environment that it is designed to monitor. The
data collected by the data collector is provided to the Data Collector
Adapter through a log file on the monitored machine, for transmittal
through the IBM Tivoli Monitoring infrastructure. Data collectors typically
have access to the following types of information about the message traffic
it monitors:
Optionally, the actual header and body content of the message itself
648
TEP Client
Web Services Navigator
SOA Topology UI
TEP Topology Adapter
UI Server
Tivoli Enterprise
Monitoring Server
(TEMS)
SOA Domain
Management
Server
Object
Access
Layer
TEPS Extension
Relationships
Mgmt Server
Tivoli Enterprise
Monitoring Server
(TEMS)
Tivoli
Data Warehouse
Message
Metrics
Mediation
Configuration
WebSphere
DC
DataPower
DC
Tivoli Common
Object
Repository
(TCORE)
Metrics History
ITCAM
for SOA
DLA
Agent
WESB
DC
WebLogic
DC
JBoss DC
BPEL
DLA
WSRR
DLA
ITCAM for SOA
Tivoli Monitoring
Monitoring agent
Figure 15-8 on page 650 depicts the overall conceptual architecture of the
monitoring agent and its sub-components.
649
Data
collector
WebSphere Application
Server
JAX-RPC
handler
Data
collector
TCAM for SOA
Monitoring agent
Log
Data
collector
Configuration
IRA
(Intelligent
Resource Agent)
Data Collector
adapter
WESB/WPS
Log
SCA/Mediation
Primitives
Data
collector
DataPower
Log
Transaction Log
API
Tivoli Enterprise
Management Server
Tivoli Enterprise
Monitoring Server
Data
collector
As described in 15.4.2, Product features on page 644 ITCAM for SOA works
with several runtime environments and technologies that may contribute to an
overall SOA:
WebSphere Application Server
WebSphere Application Server Community Edition
WebSphere Enterprise Service Bus
WebSphere Process Server
Microsoft .NET
BEA WebLogic server
JBOSS Application Server
SAP NetWeaver
650
651
Metric
log
Data
collector
Metric
log
Tivoli Enterprise
Monitoring Agent
Data
collector
TDW
Warehouse
Web Services
Navigator
Metric
log
Log Assembler
Combined
metric log
Data
collector
Metric
log
Data
collector
The Web Services Navigator is a log-browsing tool intended for offline analysis of
SOA Web services. Four primary views that are provided:
Statistic tables
Message statistics
Per-message statistics including requestor, provider, send/receive time,
and message size.
Invocation statistics
Response time, network delay, message size, and more for each Web
service invocation.
Transaction statistics
Provides statistics for aggregated transactions, including elapsed time,
number of faults, number of machines this transaction involves, and
number of invocations comprising this transaction.
Pattern invocation statistics
Provides statistics for discovered patterns, including operation names,
number of occurrences, response times, and message sizes.
652
Shows
Shows exact
exact sequence
sequence of
of
messages
messages over
over time
time
Aggregate
Aggregate interactions
interactions
among
among services.
services.
Statistics
Statistics View:
View:
A
A table
table view
view of
of the
the raw
raw data
data
collected
collected by
by the
the monitoring
monitoring
agent
agent at
at each
each interception
interception point
point
Content
Content View:
View:
Shows
Shows content
content of
of aa
SOAP
SOAP message
message
653
654
DLA
ITCAM
for
SOA
TCORE /
CCMDB
Observed
Services
Agents
Common Object
Repository
DLA
WSRR
Service
Metadata
Repository
DLA
Operational
System
(Observed)
Operational
System
(Observed)
Figure 15-11 Discovery, reconciliation and display of service information (architectural overview)
The discovery and display of service information are some key capabilities of the
Tivoli monitoring infrastructure and ITCAM for SOA.
The following sections introduces these capabilities and describe how they are
leveraged to contribute to the integration scenario between ITCAM for SOA and
WSRR.
655
topology view in Tivoli Enterprise Portal. This relationship data is obtained from
the Tivoli Common Object Repository (TCORE) database, which is populated by
one or more Discovery Library Adapters (DLAs).
656
DLA
Source of Information
on Managed Entities
DLA
TCORE /
CCMDB
DLA Book
DLA Book
Source of Information
on Managed Entities
Three DLAs are provided with IBM Tivoli Composite Application Manager for
SOA:
IBM Tivoli Composite Application Manager for SOA Discovery Library
Adapter: discovers the relationships between service ports and operations
and the application servers and computer systems on which they are
deployed, using data collected by ITCAM for SOA monitoring agents and
retrieved from Tivoli Enterprise Monitoring Server.
WebSphere Service Registry and Repository Library Adapter: discovers the
relationships between service ports, operations, services, port types, and
metadata documents from WSRR. WebSphere Service Registry and
Repository can process Web Services Description Language (WSDL) and
other definition files to determine these static relationships.
Business Process Execution Language for Web Services Discovery Library
Adapter: discovers the relationships between port types, operations, and
business processes from BPEL files.
Note: WS-BPEL Discovery Library Adapter is beyond the scope of this
scenario and this book.
657
an overview of the main entities of the Common Data Model with focus on the
SOA managed elements.
federates
WebSphere
Cell
WebSphere
Cluster
WebService
memberOf
federates
definedUsing
memberOf
WebSphereServer
memberOf
provides
federates
definedUsing
federates
WSEndPoint
WebSphere
Node
imports
WSPort
provides
Document
invokedThrough
runsOn
definedUsing
WSOperation
runsOn
definedUsing
Computer
System
federates
Business
Process
federates
WSPortType
Figure 15-13 Overview of the Common Data Model (some omitted elements)
While this is really only an SOA-centric overview of the Common Data Model it
certainly exhibits some important characteristics:
The left part of the model is centered on operational systems and topologies.
The right part of the model describes the managed Web services by breaking
them down into elementary entities such as PortType, Operation and Port.
The link between the operational elements and the Web service centric ones
is materialized by the EndPoint which is deployed on an server and is also
part of the description of a given Web service.
The Document element represent a service artefact such as WSDL, XSD or
WS-Policy document and is as such part of the notion of managed service as
a set of related entities.
658
The IBM Tivoli Composite Application Manager for SOA Discovery Library
Adapter retrieves these Web services objects using the Tivoli Enterprise
Monitoring Server SOAP interface in your environment. The discovered
resources are then written to the Discovery Library File Store in a Discovery
Library Adapter book. The IBM Tivoli Composite Application Manager for SOA
Discovery Library Adapter populates the Tivoli Common Object Repository with
the Web services objects that are observed by the ITCAM for SOA v6.1
monitoring agents. These objects represent the dynamic discovery of the Web
services related information. The data for an observed Web service includes the
service port name and namespace, the operation name and namespace, the
application server where the service port is deployed, and the computer system
on which the application server is running.
Note: ITCAM for SOA Discovery Library Adapter uses the TEMS SOAP API to
retrieve the list of ITCAM for SOA V6.1 agents and the agent data from the
TEMS Hub. Agent data from the Services Inventory table of the Performance
Summary workspace is retrieved.
Figure 15-14 illustrates the discovery of observed services in ITCAM for SOA.
DLA
ITCAM
for
SOA
Observed
Services
Common Object
Repository
Agents
Operational
System
(Observed)
TCORE /
CCMDB
Operational
System
(Observed)
Figure 15-14 Discovery of observed services using ITCAM for SOA DLA
During this discovery phase ITCAM for SOA DLA populates the Common Object
Repository (see SOA Managed Elements (Common Data Model) on page 657)
with the following managed elements and relationships between them:
WSPort: Identifies a service port name and namespace
659
660
TCORE /
CCMDB
Common Object
Repository
DLA
WSRR
Service
Metadata
Repository
During this discovery phase WSRR DLA populates the Common Object
Repository (see SOA Managed Elements (Common Data Model) on page 657)
with the following managed elements and relationships between them:
WebService: Identifies a WSDL service name and namespace
WSPort: Identifies a WSDL port name and namespace
WSOperation: Identifies a WSDL operation name and namespace
WSPortType: Identifies a WSDL port type name and namespace
Document: Identifies a WSDL, XSD, or WS-Policy document. Only WS-Policy
documents that have a relationship to a WSDL service, WSDL port, WSDL
operation, or WSDL port type are discovered. The documents content is
included in the DLA book.
Repository: Identifies the WSRR server
Note: Service Component Architecture (SCA) Modules and their artefacts are
not discovered by the WSRR DLA.
Classifications
WSRR supports classification systems loaded from Web Ontology Language
(OWL) files. Classification classes are used to organize and find artefacts in
WSRR. Any artefact can be tagged or classified with multiple classification
classes.
Refer to 9.6, Classifying objects on page 358 for additional information about
classification of artefacts.
By default, WSRR Discovery Library Adapter is configured to discover Web
services and their artefacts that are tagged with the Deployed or Managed
661
classifications. These two classifications are defined in the default OWL file
shipped with WSRR.
WSRR Discovery Library Adapter can be configured to use other classifications
when it discovers Web services or it can be configured to ignore classifications.
See Configuration instructions on page 708 for more information about
configuring classification support in WSRR DLA.
Versioning
WSRR can be used to manage different versions of WSDL documents and the
artefacts that they define. The different versions are defined by one of the
following methods:
Using the same name for a WSDL document but specifying a different version
number. The artefacts of a WSDL document inherit the version number of the
document.
Using a different name for a WSDL document but specifying the same WSDL
service, WSDL port, WSDL port type, and WSDL operation as defined in
another WSDL document.
Since the Common Data Model does not support a Version attribute for Web
service related managed elements (see SOA Managed Elements (Common
Data Model) on page 657), the WSRR DLA cannot include multiple versions of
the same Web service (and its artefacts) in its books. WSRR DLA does not
distinguish between different versions of documents and their artefacts: it
uniquely identifies a Web service by its name and namespace properties.
When the DLA retrieves the list of Web services from WSRR, it uses the first
instance of a Web service in the returned list. If there are other instances of the
same Web service (for example, a Web service with the same name and
namespace), the other instances are ignored. The WSRR DLA logs a message
when it discovers multiple instances of the same Web service.
Recommendations:
If you are using WSRR to manage multiple versions of the WSDL documents,
and you are using the WSRR DLA, use one of the following options to ensure
the WSRR DLA discovers the correct versions of your services:
Depending on your versioning policies, you may want to use a different
namespace for each version of a Web service and its artefacts. This would
particularly apply to the notion of major versions where backward
compatibility might not be maintained.
Use WSRR classifications to control which version of a Web service and its
artefacts are retrieved by the WSRR Discovery Library Adapter.
662
ITCAM
for
SOA
DLA
TCORE /
CCMDB
DLA
WSRR
663
View the business processes that use activities that are implemented by Web
services that are discovered by the ITCAM for SOA DLA or the WSRR DLA.
The business process and service relationship data is discovered by the
BPEL DLA and imported in to the Tivoli Common Object Repository.
The topologies views relevant to WSRR integration are described in more details
in WSRR integration topology views on page 665.
The Services Management workspace is accessed from a customized Navigator
view called ITCAM for SOA.
Note: The table views in this workspace contain UTF-8 character set data that
so that strings of data can be represented in different languages. Unlike other
workspaces, however, the (Unicode) designation does not appear in the
column titles for the table.
664
665
Unlike most Tivoli Enterprise Portal data displays all topology views are in a
single workspace with the topology view changing display based on the context
requested.
Topology views use the TEP Topology Adapter so they inherit many capabilities
from it such as pan/zoom, search, as well as sorting and filtering in table mode.
Note: The descriptions of the different topology views provided in the next
sections of this redbook are not intended to cover all details and functionalities
but rather focus on WSRR integration and the display of WSRR information
within TEP. For example, dynamic workspace linking is not described in this
book.
For more information, refer to the ITCAM for SOA Information Center.
http://publib.boulder.ibm.com/infocenter/tivihelp/v3r1/index.jsp?toc
=/com.ibm.itcamsoa.doc/toc.xml
The Services Overview table view displays all of the service ports, operations,
Web services, and application servers that were discovered by the DLAs and
retrieved from the Tivoli Common Object Repository. It includes information
666
about service ports and operations that are observed by IBM Tivoli Composite
Application Manager for SOA monitoring agents, and specific information defined
in WebSphere Service Registry and Repository.
The Services Overview table view contains various column headings as
described in Table 15-2.
Table 15-2 Names and descriptions of the column headings for the Services Overview
Name
Description
Service Port
Operation
Service
Application Server
Computer System
Observed
Indicates that the service port and operation have been observed
by the IBM Tivoli Composite Application Manager for SOA
monitoring agents.
Registered
The Services Overview view is the main correlation point for data from ITCAM for
SOA and WSRR as it allows comparison between designed and operational
state of services. The Observed and Registered columns are marked with a
check mark when the information has been obtained through observations by the
monitoring agents of IBM Tivoli Composite Application Manager for SOA and
from definitions in WebSphere Service Registry and Repository, respectively.
This allows for quick visual reconciliation of ITCAM for SOA and WSRR service
information as explained in Reconciliation of observed and registered services
on page 664. Figure 15-18 on page 668 illustrates the reconciliation of these two
sources of information.
667
Services observed
in ITCAM for SOA
Services
registered in
WSRR
Figure 15-18 Visual reconciliation of service information from WSRR and ITCAM for SOA
When you right-click a row in the table, the resulting context menu that is
displayed provides a list of resource actions and views, giving access to Details
views, Business Process views, Metadata, and linking to SOA Performance
Summary workspaces.
The following resource relationship views are available from the Services
Overview table view:
View Service Details
Displays the Service Details view for the service in the selected row. If no
service information is available, this menu item is not available
View Service Port Details
Displays the Service Port Details view for the service port in the selected row.
View Business Processes for Service
Displays the Business Process view for the service. If no service information
is available in the selected row, this menu item is not available. If there is no
668
669
Service
Service
contains
contains
Service
Service
Port
Port
defined
defined within
within
hosts
hosts
Operation
Operation
Application
Application
Server
Server
Figure 15-19 The Service Details view in the Services Management workspace
Use the Service Details table view to clarify your view if there are a large number
of resources contained in the topology. You can narrow your scope by using the
column sorting and filtering capabilities.
When you right-click a resource in the topology or a row in the table, the context
menu provides a list of resource actions and views. These are the resource
relationship views available from the Service Details view:
View Service Port Details
Displays the Service Port Details view for a selected port.
View Business Processes for Service
Displays the Business Process view for the selected service.
View Business Processes for Service Port
Displays the Business Process view for the selected service port.
View Metadata
Displays the Metadata dialog, which might contain a list of metadata
documents for the service, service port or operation. If only one metadata
document is available, it is displayed. This menu item is only available if the
service, service port or operation is registered in WebSphere Service
Registry and Repository.
670
Select Properties from the context menu to set a limit on the number of nodes
that you can view in the topology. If the node threshold is exceeded, the topology
view automatically switches to the table view. The default setting is 50 but you
can modify or turn off the threshold. Refer to the online help procedures to edit
the properties.
See the online help for Tivoli Enterprise Portal for information about the other
context menu actions and the capabilities for column sorting and filtering.
The Service Details table view contains the column headings as described in
Table 15-3.
Table 15-3 Names and descriptions of the column headings for the Service Details
Name
Description
Name
Resource Type
Namespace
Port Type
The definition of a set of operations for the service port that can
be deployed as a group.
Computer System
Source
Destination
Use the Show/Hide additional attributes button on the table toolbar to turn on
the columns to show more information about the services. In addition to the
previously mentioned column headings, the Service Details table view has the
following attributes.
Table 15-4 Additional attributes for the Service Details table view
Name
Description
Name
Description
Node Name
671
Name
Description
Cell Name
Cluster Name
Vendor Name
Product
672
Description
Name
Resource Type
Namespace
Port Type
The definition of a set of operations for the service port that can
be deployed as a group.
Computer System
Source
Destination
Use the Show/Hide additional attributes button on the table toolbar to turn on
the columns to show more information about the services. In addition to the
673
previously mentioned column headings, the Service Port Details table view has
the following attributes.
Table 15-6 Additional attributes for the Service Port Details table view
Name
Description
Name
Description
Node Name
Cell Name
Cluster Name
Vendor Name
Product
674
this view is obtained from multiple data sources, so all information for a given
service might not be available
Business Processes for Service Port view
The Business Processes for Service Port view displays service port
relationships for business processes. This topology or table view displays the
service port, its associated service, and all the operations that participate in
business processes along with those business processes that have been
defined in the Tivoli Common Object Repository. The icons or nodes in the
topology represent the various resource types. Similar to the Services
Overview, information for this view is obtained from multiple data sources, so
all information for a given service port might not be available.
Business Process Details view
The Business Process Details view is a topology and table view that displays
the operations, service ports, and services that have been defined in the
Tivoli Common Object Repository related to a specific business process. The
icons or nodes in the topology represent the various resource types. Similar to
the Services Overview, information for this view is obtained from multiple data
sources, so all information for a given business process might not be
available.
Note: These three views are similar to the Service Details and Service Port
Details views presented previously. Refer to ITCAM for SOA documentation if
more details are needed.
675
676
You can use this Metadata selection dialog to multi-select the metadata
documents you want to view.
677
Generation of
Situation Events
Detection of
Situations
Conditions
Situation
Definitions
Update of Service
Information
Event
Event
OTEA
Metadata
Repository
ITCAM
for
SOA
EIF
Events
Event
Handler
WSRR
Services
Observed
Re-send
Rule
Agents
WAS
TEC
TEC-OMNIbus
Probe
OMNIbus-TEC
Gateway
OMNIbus Support
planned for the future
OMNIbus
Server
Figure 15-22 Forwarding of service status information (architectural overview)
Service status information is forwarded to WSRR using the situation and events
mechanisms provided by Tivoli management infrastructure and leveraged by
ITCAM for SOA.
The following sections introduce the notions of situation and event, and describe
how these concepts contribute to feedback service operational information from
ITCAM for SOA to WSRR.
678
Once they have been configured, the situation alerts provide ITCAM trigger
notification. Situations detected by ITCAM for SOA are all directly related to the
observed services.
When the situation conditions are detected or closed, an event is generated.
Situation events materialize the originating situations and provide information
about them and the context they occur in.
Figure 15-23 depicts the detection of situations and the generation of
corresponding situation events.
Generation of
Situation Events
Event
Event
Detection of
Situations
Conditions
OTEA
ITCAM
for
SOA
Situation
Definitions
Attribute Tables
Properties
Services
Observed
Agents
Operational
System
(Observed)
Operational
System
(Observed)
Figure 15-23 Detection of situations and generation of events in ITCAM for SOA
Situations
A situation is a type of an event that is generated in Tivoli Monitoring Services.
IBM Tivoli Composite Application Manager for SOA provides predefined
situations. These predefined situations are designed to help you monitor critical
activity, and serve as templates for creating customized situations for your own
use. These predefined situations are activated when they are distributed to the
679
node that you are monitoring. After they are configured, the alerting functions
included as part of these predefined situations trigger event notification.
A situation is a condition where a set of attributes are tested against a threshold.
The situation evaluates the conditions at predefined intervals and invokes the
appropriate automated responses and notification methods.
Predefined situations are activated when they are distributed to the node that you
want to monitor. Use the Tivoli Enterprise Portal Situation Editor to distribute a
situation to a specific agent or managed system agent list. You can also use the
Situation Editor to associate a situation with a desired report node.
You can modify an existing situation to create your own.
The predefined situations that are provided with IBM Tivoli Composite
Application Manager for SOA v6.1 are listed in Table 15-7. All predefined
situations for this version of IBM Tivoli Composite Application Manager for SOA
have the _610 suffix at the end of the situation name.
Note: If you have an environment that incorporates both v6.1 monitoring
agents and v6.0 monitoring agents, you can only use the situations that apply
to each version, respectively.
For more information about predefined situations provided with IBM Tivoli
Composite Application Manager for SOA v6.1 or v6.0, refer to the product
information center.
Table 15-7 Predefined situations for ITCAM for SOA v6.1 monitoring agents
Situation name
Description
Fault_610
MessageSize_610
MaxMessageSize_610
680
Situation name
Description
MessageArrivalCritical_610
MessageArrivalClearing_610
ResponseTimeCritical_610
ResponseTimeWarning_610
MaxResponseTimeCritical_610
MaxResponseTimeWarning_610
Attributes
The information triggering a situation and available in the corresponding event
depends on the type of the observed resource that is at the origin of the situation.
These characteristics are described as attributes in the attribute tables. ITCAM
for SOA situation events contain attributes as a list of property-value pairs.
Note: Event attributes are also called event class attributes or properties in the
ITCAM for SOA and ITM documentation.
681
IBM Tivoli Monitoring gathers data from the various monitoring agents installed
on the computers in your environment. Information about Web services is
collected for IBM Tivoli Composite Application Manager for SOA and stored for
display in tables of attributes. Each attribute is a characteristic of an object from
the Common Object Model. For example, Service Port Name is an attribute of a
message that identifies the name of the service port where the message was
intercepted and for which filtering is defined.
Data that is stored in attribute tables is displayed in various table views in the
Tivoli Enterprise Portal workspaces. Each table view corresponds to a group of
attributes. Columns in the table view correspond to the attributes in the group.
Some of these attributes are used as parameters for the creation of situations, or
for specifying Take Action commands.
Table 15-8 summarizes the attribute tables used by ITCAM for SOA v6.1. These
tables contain the attributes that apply to v6.1 monitoring agents for IBM Tivoli
Composite Application Manager for SOA. Table names corresponding to their
v6.0 counterparts have a _610 suffix attached to signify that they are for v6.1
attributes only. Many attributes in v6.1 tables have similar names and function to
their v6.0 counterparts. These tables also include new attributes that only apply
to v6.1 data collectors.
Note: Tables specific to v6.0 are not described in this book.
For more information about attribute tables, refer to the IBM Tivoli Composite
Application Manager for SOA information center and product documentation.
Table 15-8 ITCAM for SOA v6.1 attribute tables
Attribute Table
Description
682
Attribute Table
Description
683
All the attribute tables introduced in Attributes on page 681 might contribute to
the generation of situation events related to observed services. However, only
the situation events generated from the KD42IT: Services Inventory_610
attribute table are propagated to WSRR.
As previously described, the events identify the situation name, situation status,
and the service port, operation, application server, and computer system where
the event occurred.
684
685
686
687
Event
Event
OTEA
ITCAM
for
SOA
EIF
Events
Event
Handler
WSRR
Re-send
Rule
WAS
TEC
TEC-OMNIbus
Probe
OMNIbus-TEC
Gateway
OMNIbus
Server
OMNIbus support planned for the future
Figure 15-24 Propagation of situations events from ITCAM for SOA to WSRR
OMEGAMON TEC Event Adapter (OTEA) receive filter, adapts and forwards the
events generated by ITCAM for SOA to the different communication channels
between ITCAM for SOA and WSRR ITCAM for SOA Event Handler.
There are two different ways to propagate events to WSRR ITCAM for SOA
Event Handler:
Configure ITM to forward ITCAM for SOA situation events for the
Services_Inventory_610 table directly to the ITCAM for SOA Event Handler if
no event server is being used with ITM
688
689
Properties
Event
Event
Metadata
Repository
Properties
Update of Service
Information
Event
Handler
WSRR
WAS
690
Service providers could use this information to define and plan service
migration/retirement strategies based on the utilization rate of a particular
service.
The effectiveness of the SOA can be captured in the service information
where service usage could directly reflect the success overall reuse policy of
services across consumers.
Figure 15-26 depicts a logical architecture where a logical ESB component
would use the enhanced service information and metadata to implement
mediation policies. This logical architecture is an extension of the one which was
introduced previously.
Service
Consumer
Service
consumers
uses service
information
and metadata
to access and
consume
services.
Service Consumer
consumes
virtualized/exposed
services
Service
Provider
ESB
Provided
services are
virtualized
Service
Registry
& Repository
Provided
services are
registered in
SRR
Information on
registered services is
made available
Services are
observed by
the Monitoring
and
Management
infrastructure
Monitoring &
Management
Operational data on
observed services
is fed back
Information on registered
services is reconciled with that
collected from observed
services and is used to
augment the understanding of
the management domain
691
Observed services
Figure 15-27 on page 693 summarizes the services as observed by ITCAM for
SOA.
692
Observed Services
(ITCAM for SOA)
ItemPriceService
ItemPriceDiscountedService
Registered services
Figure 15-28 shows the services registered in WSRR and their associated
lifecycle state.
Registered Services
(WSRR)
ItemPriceService
Manage
ItemPriceDiscountedService
ItemPriceEnquiryService
Assemble
693
694
Service Provider
Application Server
Data
Collector
Service
Consumer
ItemPriceService
ItemPriceDiscountedService
Monitoring Agent
Service
Registry
& Repository
Monitoring Server
Monitoring Console
Monitoring SOA Support
Monitoring Model
Event Listener
Monitoring Warehouse
Figure 15-29 WSRR and ITCAM for SOA working scenario: logical architecture
Figure 15-29 depicts the logical nodes and focusses on the capabilities and
responsibilities of each of the components running on each node.
Note: The nodes depicted here are logical nodes and do not reflect the
operational topology which is described in 15.8.4, Operational architecture
on page 697.
Service Consumer
The Service Consumer logical node hosts the service consumer capabilities and
acts as a requestor for the services deployed on the Service Provider node. This
node is of no particular relevance in the context of our scenario.
Service Provider
The Service Provider logical node hosts the services (ItemPriceService and
ItemPriceDisountedService) that are provided to the consumers. These services
695
696
The Monitoring Warehouse archives monitoring information for later retrieval and
analysis. This capability is not illustrated in our scenario.
697
Service Provider
(itso-wmb)
WebSphere Application Server v6.0.2 FP11
ITCAM for SOA Agent v6.1
Service
Consumer
WSRR v6.0.0.1
TEP (Desktop)
Figure 15-30 WSRR and ITCAM for SOA working scenario: operational architecture
All physical nodes are running Windows 2003 Server Service Pack 1.
WSRR and ITCAM for SOA Event Handler are deployed in the same instance of
WebSphere Application Server. Security is turned on, on this application server.
698
Note: The detailed procedure to monitor services using ITCAM for SOA is not
described in this redbook.
For more information, refer to the following resources:
IBM Tivoli Composite Application Manager V6.0 Family: Installation,
Configuration, and Basic Usage, SG24-7151 (Part 4: IBM Tivoli Composite
Application Manager for SOA)
Patterns: SOA Foundation Service Creation Scenario, SG24-7240
(Chapter 12: Manage and monitor services with ITCAM for SOA)
Patterns: SOA Foundation Service Connectivity Scenario, SG24-7228
(Chapter 12: Service monitoring and management with IBM Tivoli
Composite Application Manager for SOA)
Best Practices for SOA Management, REDP-4233
You can also refer to the product documentation available at the following
address:
http://www-306.ibm.com/software/tivoli/products/composite-applicationmgr-soa/
These services are observed by ITCAM for SOA using a data collector
implemented as a JAX-RPC Handler (see Monitoring agent on page 649).
The TCORE database has been updated using the DLA book produced by the
ITCAM for SOA Discovery Library Adapter, reflecting the services currently
observed.
Figure 15-31 on page 700 is a screen capture of Tivoli Enterprise Portal
displaying the services in the Physical workspace as they are being observed
using ITCAM for SOA WebSphere Application Server Data Collector after some
traffic involving the two services has been generated.
699
700
Both operations have the same signature and manipulate the same service
data model as the services share the same PortType. Similar average
message sizes for the two services illustrate this as captured in the Average
Message Size view. The slight difference is due to the faults returned as part
of the simulated failures.
ItemPriceService is slower than ItemPriceDiscountedService as captured in
the average response time view. This is the expected behavior as described
in Chapter 12, Scenarios description on page 453.
By using the simulated error cases provided by the two services we can observe
the resulting faults as they are captured in ITCAM for SOA. Figure 15-32 on
page 702 shows the resulting display in the console.
701
702
Note: For more information about WSRR Discovery Library Adapter, refer to
the readme.txt file provided with the installation package.
Event
props
Event
Adapter
Discover
Published
and
Operational
Data in
WSRR
WSRR
WSRRDLA
DLAProcess
Process
- -Discovery
of registered services
Discovery of registered services
- Create Intermediate file
- Create Intermediate file
- Create IdML book using DL API
- Create IdML book using DL API
- Call script to transfer file
- Call script to transfer file
Determine
deltas from
last run
Cached
Discovery
Info
Transfer
book to
DLFS
Discover Library
File Store
703
704
When a discovery library adapter book is loaded using the bulk load program, the
data in the book is associated with the Managed Software System (MSS) that is
identified by the DLA application code and the hostname of the server where
WebSphere Service Registry and Repository is installed. The data for one MSS
does not replace data for another MSS in the database.
The discovery library adapter writes books to the directory that is specified in the
discovery library adapter configuration properties file,
WSRR_DLA.config.properties (see Editing WSRR_DLA.config.properties file on
page 708). If this directory is not accessible to the bulk load program, the
discovery library adapter file transfers books to the computer where the bulk load
program is running. The discovery library adapter supports the File Transfer
Protocol (FTP) or Secure Shell (SSH) File Transfer Protocol (SFTP). SFTP is
only supported when the discovery library adapter is running on a Linux, AIX, or
Solaris operating system. When a book is file transferred, it is removed from the
discovery library adapter local directory once the file transfer completes. A
command line option or configuration property is used to confirm that the file
transfer was successful when FTP is performed. When a file transfer
confirmation is requested, the discovery library adapter reads the book from the
target computer and compares it to the original book. If an error occurs during
the file transfer, the book remains in the local directory. The next time the
discovery library adapter is run, the discovery library adapter attempts to transfer
the book again.
Use a command line interface to run the discovery library adapter. You can either
run the discovery library adapter manually or you can use operating system
utilities, such as cron on the Linux, Solaris, or AIX operating systems to
periodically run the discovery library adapter.
705
Installation instructions
The WSRR Discovery Library Adapter is packaged in the WSRRV600_DLA.zip file
that also includes a readme.txt file. To install the discovery library adapter,
perform the following steps:
1. Copy the WSRRV600_DLA.zip file to the computer where you plan to install the
discovery library adapter.
2. Create the directory where you plan to install the discovery library adapter.
This directory is referred to as DLA_INSTALL_DIR in this readme.
3. Uncompress the WSRRV600_DLA.zip file into the directory that you created in
step 2:
For the Windows operating system, use an uncompress utility, such as
WinZip. If using WinZip, ensure that the Overwrite existing files and
Use folder names check boxes are selected.
For a Linux, Solaris, or AIX operating system, run the unzip command to
uncompress the .zip file. The following command example uncompresses
the .zip file into the current directory:
unzip ./WSRRV600_DLA.zip
Note: If you are installing the discovery library adapter on the AIX operating
system and your computer does not have the unzip command, download the
unzip command from the IBM AIX support site.
After the files are extracted from the .zip file, the file structure should match
Example 15-1.
Example 15-1 File structure after installing WSRR DLA
[DLA_INSTALL_DIR]
706
--- readme.txt - The readme file
cache files
+-- jars - Directory for the discovery library adapter .jar files
+-- logs - Default directory for the discovery library adapter log
files
processing
Working example
In our working scenario, the WSRR DLA is installed on Windows 2003 Enterprise
Server as summarized in Example 15-2.
Example 15-2 Installation of WSRR DLA working example
707
Configuration instructions
This file contains properties that specify how to connect to WSRR, the directories
to use when creating books, and how to perform logging and tracing.
At a minimum, configure or verify the values for the following properties:
com.ibm.management.soa.dla.wsrr.address
The value of this property specifies the hostname of the server where
WebSphere Service Registry and Repository is installed. The default value is
localhost.
com.ibm.management.soa.dla.wsrr.port
The value of this property specifies the bootstrap address and JNDI port
number of the WebSphere Application Server environment that WebSphere
Service Registry and Repository is running on. The default value is 2809.
com.ibm.management.soa.dla.wsrr.domainName
The value of this property specifies the domain of the server WebSphere
Service Registry and Repository is installed on. This property is used if the
discovery library adapter is unable to determine the domain name portion of
the hostname from the environment. The default value is ibm.com.
com.ibm.management.soa.dla.wsrr.websphereSecurityEnabled
The value of this property indicates whether security is enabled on the
WebSphere Application Server where WebSphere Service Registry and
Repository is installed. When this property is set to true, you must provide
values for the com.ibm.management.soa.dla.wsrr.userid and
com.ibm.management.soa.dla.wsrr.password properties. The supported
values are true and false. The default value is true.
com.ibm.management.soa.dla.wsrr.securityEnabled
The value of this property specifies if the password property is encoded in the
properties file. If set to true, the password value is replaced with (*) and an
encoded version of the password is added as the value of the
com.ibm.management.soa.dla.wsrr.password.encoded property by the
708
discovery library adapter. If set to false, the password value is not encoded.
The supported values are true and false. The default value is true.
com.ibm.management.soa.dla.wsrr.userid
The value of this property specifies the username that the DLA provides when
using the WSRR Java API. This user must be assigned a role, either the
Administrator or a custom defined role, that can query the desired WSRR
classifications. There is no default value.
com.ibm.management.soa.dla.wsrr.password
The value of this property specifies the password of the user in the
com.ibm.management.soa.dla.wsrr.userid property. There is no default
value.
com.ibm.management.soa.dla.wsrr.uriClassifications
The value of this property specifies the list of classifications the WSRR DLA
uses when retrieving Web service information from WSRR. Only services that
are tagged with the listed classifications are discovered. If no classifications
are listed, or the property is commented out, then all Web services in WSRR
are discovered.
The default classification list is the Deploy (State3) and Manage (State4)
classifications that are installed with WSRR as part of the default service
lifecycle. See 13.2, Using lifecycles on page 476 for a description of how to
use service lifecycles. Other classifications (not necessarily related to states
in the service lifecycle) can be used. Refer to 9.6, Classifying objects on
page 358 for more information about loading and using classifications.
Note: Classifications also apply to WS-Policy documents. For example, if a
policy document is not assigned one of the classifications in the list, the
document is not included in the discovery library adapter book even if it is
associated with a Web service that does match one of the classifications.
com.ibm.management.soa.dla.wsrr.includeDocuments
The value of this property specifies whether the contents of WSDL, XSD, and
WS-Policy documents are included in the WSRR DLA books. If this property
is set to true, the document contents are included in the DLA books. The
supported values are true and false. The default value is true.
709
Working example
In our example we edit the WSRR_DLA.config.properties file and define the
content of the required properties as summarized in Example 15-3.
Example 15-3 WSRR_DLA.config.properties
710
have WSRR DLA process encrypt the password and valuate the
com.ibm.management.soa.dla.wsrr.password.encoded property with the
encoded value while removing the unencrypted one. As described in
Chapter 12, Scenarios description on page 453, we use specific credentials
(uid=itcam4soa, pwd=passw0rd) for ITCAM for SOA to access WSRR as an
identified actor in the overall SOA.
We use the default lifecycle and its associated classification so that WSRR
DLA only discovers services that are classified as Manage or Deploy as a
consequence of their state in the service lifecycle. This is the default value
for the com.ibm.management.soa.dla.wsrr.uriClassifications property.
Configuration instructions
This file contains the properties that specify how to connect to the file transfer
server, the directories to use when transferring books, and how to perform
logging and tracing.
At a minimum, the following properties must be configured for the discovery
library adapter to perform a file transfer:
com.ibm.management.soa.dla.filetransfer.host
The value of this property specifies the host name or IP address of the target
computer. Books are transferred to this computer by the discovery library
adapter.
com.ibm.management.soa.dla.filetransfer.userid
The value of this property specifies the username that is used to access the
target computer. This user must be granted the authority to write files to the
target directory. If using FTP with confirmation, the user also requires
authority to read and delete files in the target directory.
com.ibm.management.soa.dla.filetransfer.password
The value of this property specifies the password of the user that is used to
access the target computer.
Note: Changing the value of other file transfer properties might be required if
you do not want to use the default values in the properties file, such as the
default directory on the target computer.
See the DLA_FIleTransfer.properties file for the complete list of properties and
a description of each property.
711
Using SFTP
If you plan to use the SFTP protocol to file transfer discovery library adapter
books when the discovery library adapter is installed on a Linux, AIX, or Solaris
operating system, you must perform the following steps to configure SSH:
Ensure that SSH is installed on both the source and target computers.
Log on to the source computer as the user who runs the discovery library
adapter and generate public and private keys. On most systems, use the
ssh-keygen command. Press Enter when prompted for a passphrase for the
easiest configuration.
On the target computer, log on as the user that the discovery library adapter uses
when accessing the target computer. Add the contents of the public key from the
source computer into the ~/.ssh/authorized_keys file.
Note: If you created the keys using a passphrase, use the ssh-agent and
ssh-add commands to prevent a prompt for the pass phrase. See the following
URL for more information:
http://www.ibm.com/developerworks/library/l-keyc2/
Use the sftp command on the source computer to check connectivity to the
target computer and verify that no password or passphrase prompt is presented.
For example:
sftp user@targetserver.com
Note: When SFTP is used, a value for the password property is still required
in the DLA_FileTransfer.properties file. However, the value of the password
property is not used.
If you do not generate public and private keys, the discovery library adapter
cannot transfer books using the SFTP protocol.
712
Working example
We do not use FTP or SFTP transfer in our working scenario. WSRR DLA books
are manually copied to the ITM installation.
Configuration instructions
If you installed the DLA on a Windows operating system, edit the
[DLA_INSTALL_DIR]\bin\WSRR_DLA.bat file, and, if you installed the DLA on a
Linux, AIX, or Solaris operating system, edit the
[DLA_INSTALL_DIR]/bin/WSRR_DLA.sh file.
Make sure the following variables are defined accordingly:
WAS_BIN
Set this variable to the location of WebSphere Application Server bin directory
as shown in Example 15-4.
Example 15-4 Setting the WAS_BIN variable in WSRR DLA script files
Working example
In our example we edit the [DLA_INSTALL_DIR]\bin\WSRR_DLA.bat file and define
the content of the variables as shown in Example 15-6 on page 714.
713
Execution instructions
Running the WSRR Discovery Library Adapter involves the following steps:
1. Using a command interpreter, change directories to the
[DLA_INSTALL_DIR]/bin directory.
2. Run the WSRR DLA using the following options:
For a Windows operating systems: WSRR_DLA.bat [OPTIONS]
For all other operating systems: ./WSRR_DLA.sh [OPTIONS]
The options to be passed to the script ([OPTIONS]) are the following:
[-o configfile]
This option specifies the name of the discovery library adapter configuration
properties file. The directory containing the properties file must be in the DLA
classpath.
The [DLA_INSTALL_DIR]/bin directory is in the classpath by default. If this
option is not specified, the
[DLA_INSTALL_DIR]/bin/WSRR_DLA.config.properties file is used.
[-p protocol]
Specifies the file transfer protocol. The default is FTP.
714
Working example
In our scenario we run the WSRR DLA to extract information about the services
that are classified as Managed or Deployed. This reflects the fact that these
services are governed entities and have gone through some stages in the
service lifecycle as described in Registered services on page 693.
The following table summarizes the different services registered in WSRR before
the execution of the WSRR DLA.
Table 15-9 Services registered in WSRR before running WSRR DLA
Service
Lifecycle State
ItemPriceService
Managed
ItemPriceDiscountedService
Managed
ItemPriceEnquiryService
Assembled
We run the WSRR DLA by issuing the following commands in a DOS command
windows.
Example 15-7 Running WSRR DLA
C:\>cd C:\ITSO\WSRR\ITCAMforSOA-WSRR_DLA\bin
C:\ITSO\WSRR\ITCAMforSOA-WSRR_DLA\bin>WSRR_DLA.bat -r -d
The last command line:
Forces the creation of a refresh book (-r option)
715
716
Transfer instructions
Transfer of DLA books can be automatically performed by the DLA scripts when
configuration values have been specified in the configuration files. See Editing
DLA_FileTransfer.properties file on page 711.
Working Example
In our example, we do not use the automatic book transfer feature but rather
manually copy the WSRR DLA book to the appropriate directory.
We use the following directory as the DLFS on the itso-itcam machine:
C:\ITSO\WSRR\DLA\books
Working example
Run the Bulk Load Program as follows:
cd C:\IBM\ITM\CNPS\Products\KD4\tcore\bin
The location of the Bulk Load Program can vary depending on your installation.
loadidml -f C:\ITSO\WSRR\DLA\books\<book name>
717
C:\IBM\ITM\CNPS\Products\KD4\tcore\bin>loadidml -f
C:\ITSO\WSRR\DLA\books\WSRRv6
00.ITSO-WSRR.itso.ral.ibm.com.2006-12-13T01.22.06.219Z.refresh.xml
C:\IBM\ITM\CNPS\Products\KD4\tcore\bin>call setenv.bat
Bulk Load Program starting.
Bulk Load Program running.
Bulk Load Program running.
Bulk Load Program succeeded. Return code is: 0
0
Bulk Load Program ending.
At this point the TCORE model should have been updated to reflect both the
services as they are observed by ITCAM for SOA and the services registered in
WSRR. The situation should be the one depicted in Figure 15-34 on page 719.
718
Observed Services
(ITCAM for SOA)
Registered Services
(WSRR)
ItemPriceService
ItemPriceService
ItemPriceDiscountedService
ItemPriceDiscountedService
ItemPriceEnquiryService
WSRR
DLA Book
(Registered Services in
Deploy or Manage state )
ItemPriceService
ItemPriceDiscountedService
ItemPriceService
ItemPriceDiscountedService
TCORE /
CCMDB
ItemPriceService
ItemPriceDiscountedService
719
Figure 15-35 Accessing Services Management workspace using the Navigator View in
TEP
720
721
Figure 15-37 and Figure 15-38 on page 723 illustrate the Service Details views
associated respectively with ItemPriceService and
ItemPriceDiscountedService.
722
These visual representations of the service topology are built from the
information stored in the Common Object Repository describing each of these
services and related resources:
Services: ItemPriceService and ItemPriceDiscountedService are
represented as bells.
Service Ports: ItemPrice and ItemPriceDiscounted are represented as bells
linked to gearings.
Operation: the single getPrice operation provided by both services is
represented as a gearing.
Server: both services are running on the same server called server1.
While our example is pretty straightforward, more complex topologies would take
advantage of this visual representation mode to provide an immediate
understanding of the relationships among the different resources of the SOA.
One can obtain more information either using the hover help or the table view.
Hover help is triggered by hovering the mouse for some time over the selected
element as illustrated in Figure 15-39 on page 724.
723
Switching between topology view and table view in the Service Details view is
done using either the dedicated buttons in the toolbar or the Topology View as
Table/View as Topology items in the contextual menu. Figure 15-40 illustrates
the Service Details view of ItemPriceService displayed in a table view.
The table view provides more information about all resources linked to a given
service than the corresponding topology view, for example:
Name of the resource
Type of the resource
Namespace for Operation, Service and Service Port resources
Associated PortType for Operation and Service Port resources
IP address of the hosting Computer System for Server resources
Relationships between the different resources
Note: Additional attributes for each resource can be displayed or hidden using
the filtering mechanism provided by the table view.
724
When accessing the Metadata view for the ItemPriceService, we are displayed a
selection dialog to choose the metadata documents we want to view. This
process is illustrated in Figure 15-42 on page 726.
725
This process provide support for multiple metadata documents related to a given
resource to be displayed in TEP.
In our example above, ItemPriceService has two related metadata documents:
ItemPricePortType.wsdl: this is the interface WSDL, where PortType,
Messages and Schemas are defined.
ItemPrice.wsdl: this is the implementation WSDL for the ItemPriceService,
which references the ItemPricePortType WSDL document.
Figure 15-43 on page 727 illustrates the display of ItemPricePortType.wsdl
metadata document for ItemPriceService.
726
727
forwarding on page 677 for more information of the key aspects of this
integration.
Configuration
File
Integration
Logic
Editor for
Configuration File
WSRR
Metadata
Repository
Web Browser
Events sent by ITCAM for SOA using the Event Integration Facility or EIF (see
Propagation of situation events on page 687) are captured by the Event
Adapter which adapts the content of the event to the internal data model,
including the properties of the event.
The adapted event is passed to the Integration Logic which processes the event
received and updates the content of the corresponding elements in WSRR using
the Web Services API.
728
Installation prerequisites
The following are prerequisites for the ITCAM for SOA Event Handler:
IBM WebSphere Application Server V6.0.2 and Fix Pack 11 or later. This can
be the same application server to which the registry is installed.
IBM WebSphere Service Registry and Repository 6.0.0.1 installed and
configured.
IBM Tivoli Monitoring V6.1 Fixpack 4
IBM Tivoli Composite Application Manager for SOA V6.1
Tivoli Enterprise Console V3.9 (optional)
ITCAM for SOA Event Handler is packaged as part of the WSRR 6.0.0.1 ITCAM
for SOA Event Handler SupportPac. This SupportPac is now available as a
archive file for customer download at the following URL:
http://www.ibm.com/support/docview.wss?rs=171&uid=swg24014240&loc=en
_US&cs=utf-8&lang=en
Installation instructions
1. For Windows download sa04.zip to a temporary location. For Linux or Unix
download sa04.tgz to a temporary location.
2. Extract ITCAMListener.ear from the downloaded file to a temporary location.
3. Using the WebSphere Application Server administration console or command
line wsadmin tool, deploy the ear to the chosen installation of WebSphere
Application Server.
729
Working example
In our example we install the Event Handler on the same instance of WebSphere
Application Server that already hosts WSRR. Hence we do not need to copy the
extra client jars to that instance.
Installing the ITCAMListener.ear file as a new Enterprise Application is
performed using the administration console. Start the application.
Figure 15-45 shows the result of the installation in WebSphere Application
Server administration console after application has been started.
Figure 15-45 ITCAM for SOA Event Handler installed as an Enterprise Application in
WebSphere Application Server administration console
730
Configuration instructions
Configuration of the ITCAM for SOA Event Handler is performed via a Web
configuration console. The URL for this is:
http://<server name>:<port number>/ITCAMWeb/admin
Figure 15-46 illustrates the Web configuration console provided by ITCAM for
SOA Event Handler.
Figure 15-46 ITCAM for SOA Event Handler Web configuration console (Configuration page)
731
From this page the registry which is to be updated by the Event Handler is
specified, along with any required security information and logging information.
On the left-hand side is a navigation pane with links to the State page, where the
Event Handler is stopped and started, and the EventMapping page where the
incoming events that are to be mapped to custom properties in the registry are
specified. The Configuration link points to the Configuration page.
Pressing Submit saves the configuration and pressing Refresh reverts the
configuration page back to the currently saved configuration.
Figure 15-47 illustrates the State page of the ITCAM for SOA Event Handler
configuration console.
Figure 15-47 ITCAM for SOA Event Handler Web configuration console (State page)
Figure 15-48 on page 733 illustrates the EventMapping page of the ITCAM for
SOA Event Handler configuration console.
732
Figure 15-48 ITCAM for SOA Event Handler Web configuration console (EventMapping page)
The following sections describe the various aspects of the Event Handler that
require configuration. These configuration points are all accessed using the Web
configuration editor and the navigation pane located of the left part of the screen.
733
Assuming security is off for the server where WSRR instance is running, then the
endpoint should be:
http://<server name>:<port number>/WSRRCoreSDO/services/WSRRCoreSDOPort
For example:
http://myserver:9080/WSRRCoreSDO/services/WSRRCoreSDOPort
If security is enabled for the server where WSRR instance is running, then the
endpoint should be:
https://<server name>:<secure port
number>/WSRRCoreSDO/services/WSRRCoreSDOPort
For example:
https://myserver:9443/WSRRCoreSDO/services/WSRRCoreSDOPort
UID and PWD refer to the username and password required to log in to WebSphere
Service Registry and Repository. These are only needed when security is
enabled, otherwise leave blank.
734
Explanation
EventID
WSRRPropertyName
735
Setting
Explanation
Compound
Appends the name of the service operation that triggered the event to the front
of the property name, for example methodname.propertyname.
This differentiates properties associated with different operations that share a
service endpoint.
Received Type
(WSRRPropertyValue)
Received Value
(WSRRPropertyValue)
Used for ReceivedTypes of Property Value and Static String, this value is used
to specify which event property of the incoming event to put in the registry
property value, or the static string to put in the registry property value.
See ITCAM for SOA event properties on page 737 for the list of event property
names that can be specified for this setting when the Received Type is set to
Property Value.
Cleared Type
(WSRRPropertyValue)
The Cleared Type selection is used for events received with a status of N.
Possible values: Removal, Property Value or Static String:
A value of Removal indicates the WSRR property associated with the
received event will be removed.
A value of Property Value indicates the value of the WSRR property
associated with the received event will be updated with the value of the
event property entered in the Cleared Value column.
A value of Static String indicates the value of the WSRR property
associated with the received event will be updated with the value of the
string entered in the Cleared Value column.
Cleared Value
(WSRRPropertyValue)
Used for Cleared Types of Property Value and Static String, this value is used
to specify which event property of the incoming clearing event to place in the
registry property value, or the static string to place in the registry property value.
Disabled when Cleared Type is Removal.
See ITCAM for SOA event properties on page 737 for the list of event property
names that can be specified for this setting when the Cleared Type is set to
Property Value.
New event mappings can be introduced by pressing the create button which
creates an empty row in the table. When this page is revisited the EventIDs are
ordered alphabetically, so a new event map may no longer be seen at the bottom
of the table. Pressing Submit saves the configuration and pressing Refresh
reverts the configuration page back to the last saved configuration.
736
737
Note: If you define a custom situation for the Services Inventory_610 table
that the Event Handler should process, you must select the Unique_Key_U
event property as the value of the Display Item selection when configuring
the advanced situation options.
Table 15-11 ITCAM for SOA event properties
Event property name
Description
appl_label
application_server_cellName_u
Name of the application server cell where the port and operation are
deployed.
application_servercluster_u
Name of the application server cluster where the port and operation
are deployed.
application_servername_u
Name of the application server where the port and operation are
deployed.
application_server_nodename_u
Node name of the application server where the port and operation
are deployed.
application_serverenv
avg_elapsed_time
avg_msg_length
cms_hostname
cms_port
elapsed_time_msg_count
738
Description
fault_count
hostname
Base event class attribute that contains the TCP/IP hostname of the
managed system where the event originates, if available.
integration_type
interval_begin_time
interval_end_time
interval_length
interval_status
local_hostname_u
Hostname of the machine where the port and operation are deployed
local_ipaddress_u
IP address of the machine where the port and operation are deployed
master_reset_flag
max_elapsed_time
max_msg_length
min_elapsed_time
min_msg_length
msg
Base event class attribute that contains the situation name and
formula.
msg_count
operation_name_u
operation_namespace_u
739
Description
port_namespace_u
port_number
severity
service_name_u
situation_displayitem
situation_eventdata
situation_name
situation_origin
situation_status
situation_time
source
std_dev_elapsed_time
std_dev_msg_length
sub_source
Base event class attribute that contains the origin managed system
name for the associated situation.
table_version_u
unique_key_u
740
Working example
In our example the Event Handler is installed on the same instance of
WebSphere Application Server than WSRR. Security is turned on in this
instance.
To configure the ITCAM for SOA Event Handler, we use the Web configuration
console using the following URL:
http://itso-wsrr:9080/ITCAMWeb/admin
We begin with the base configuration of the Event Handler, accessed using the
Configuration link in the navigation pane on the left side. Also, the
Configuration page should be displayed by default when first accessing the
Event Handler Web configuration URL.
Configuration
As summarized in Table 15-12, we start by setting the configuration attributes in
the Configuration page.
Table 15-12 Configuration attributes for Event Handler (working example)
Section
Attribute
Value
ITCAMListener
Port
1111
WSRRLocation
Endpoint
https://localhost:9443/WSRRCoreSDO/services/WS
RRCoreSDOPort
UID
itcam4soa
PWD
itso4you
Enabled
yes
TrustStore
C:\Program
Files\IBM\WebSphere\AppServer\profiles\default\ect
\DummyClientTrustFile.jks
TrustStore Password
WebAS
KeyStore
C:\Program
Files\IBM\WebSphere\AppServer\profiles\default\ect
\DummyClientKeyFile.jks
KeyStore Password
WebAS
Https
741
Section
Attribute
Value
EIFLogger
LogFileName
C:\itso\eif\eif01.log
LogLevel
ALL
TraceFileName
C:\itso\eif\eif01.trc
TraceLevel
ALL
Note: for our example we are using the default TrustStore and KeyStore
provided by WebSphere Application Server. In a real world deployment we
recommend that you generate your own cryptographic stores.
Also, we set both the Log and Trace levels to ALL in order to easily assess the
correct behavior of the Event Handler. For performance reasons this is
obviously not a recommended setting in any real case scenarios.
We click the Submit link to validate and save our changes. A confirmation screen
reading The configuration file has been saved successfully should be
displayed on the screen.
We can proceed with the definition of the event mappings.
Note: To obtain more information about the events received and processed by
the Event Handler, we also turned on the corresponding WSRR logs in
WebSphere Application Server:
com.ibm.wsrr.*=all
EventMapping
The definition of event mappings is performed using the EventMapping page. This
page is accessed via the EventMapping link on the navigation pane located on the
left side.
In our scenario we use the Fault_610 situation to trigger the propagation of
situation events from ITCAM for SOA to WSRR and ultimately update status
information. While this most probably would not be sufficient in a real life
deployment, our scenario provides us with an easy way to generate faults from
the deployed services by using incorrect item name (see Chapter 17, Integrating
WSRR with CICS on page 825 for a complete description of the scenario).
742
743
Note: As discussed before, the fact that ITCAM for SOA uses situation events
to forward service status information to WSRR implies that you pay particular
attention when defining the event mappings in the Event Handler. Effectively,
events mappings and the associated situations that trigger their emission will
ultimately determine the frequency of that feedback loop from ITCAM for SOA
to WSRR.
Depending on your exact requirements, you may want to limit the number of
event mappings and situation events, change the settings of these situations,
use custom situations to control this feedback more precisely.
To define the adequate event mappings for our scenario, we start by deleting all
default event mappings using the Delete button.
Then we create a new event mapping using the Create button. Define the event
mapping as described in Table 15-13.
Table 15-13 Creating event mapping (working example)
Setting
Value
EventID
Fault_610
WSRRPropertyName
AvgResponseTime
Compound
No
Received Type
Property Value
Received Value
avg_elapsed_time
Cleared Type
Static String
Cleared Value
cleared
744
We click the Submit link to validate and save our changes. A confirmation screen
reading The configuration file has been saved successfully should be
displayed on the screen.
Once the configuration of the Event Handler has been saved we can proceed
with restarting the Event Handler.
State
Once updated, the configuration of the Event Handler does not take effect until
the Event Handler application has been restarted. The State page allows us to
restart the Event Handler and is accessible using the State link on the left-hand
side navigation pane.
The Event Handler should be running as illustrated by a green arrow beside the
Module State label.
We stop the Event Handler by clicking on the Submit button. The arrow
mentioned above should be replaced by a red cross.
745
We restart the Event Handler by clicking another time on the Submit button. The
red cross should be replaced by the green arrow.
Now that we are all set with ITCAM for SOA Event Handler, we can configure
Tivoli Monitoring infrastructure to send event to the Event Handler.
Configuration instructions
Note: Currently you cannot forward events directly from a Tivoli Enterprise
Monitoring Server running in z/OS to the Event Handler. If you want to forward
events detected for z/OS monitoring to the Event Handler, there are a couple
of options to achieve that:
You can run the Tivoli Enterprise Monitoring Server in zLinux and from
there forward the situations to the Event Handler.
You can run the Tivoli Enterprise Monitoring Server in a distributed
system and then forward the events to the Event Handler.
To configure IBM Tivoli Monitoring to forward events, you need to start by
enabling event forwarding for the Tivoli Enterprise Monitoring Server.
For Windows monitoring servers only, do the following:
Open the Manage Tivoli Enterprise Monitoring Services application.
Right-click the Tivoli Enterprise Monitoring Server and click
Reconfigure.
746
TEC Server Location: Type the host name or IP address for the server
where the Event Handler is installed.
TEC Port Number: Type the port number that the Event Handler is
listening on. By default, the Event Handler uses port number 1111. The
port number must match the port number value specified when you
configured the Event Handler.
For UNIX and Linux monitoring servers, do the following on the server where
Tivoli Enterprise Monitoring Server is installed:
At the command line change to the /opt/IBM/ITM/bin directory (or the
directory where you installed IBM Tivoli Monitoring).
Run the following command:
./itmcmd config -S -t tems_name
where tems_name is the name of your monitoring server (for example,
HUB_itmdev17).
You will be prompted for the monitoring server configuration values. Enter
the same values that you provided when you installed the monitoring
server until you are asked about the TEC Event Integration Facility.
Answer YES for this question and press Enter. Complete the following
additional steps:
At the TEC Port prompt, type the port number that the Event Handler is
listening on. By default, the Event Handler uses port number 1111. The
port number must match the port number value specified when you
configured the Event Handler.
Once event forwarding has been enabled for Tivoli Enterprise Monitoring Server,
you need to specify where events are to be forwarded to. In this case, you need
to have Tivoli enterprise Monitoring Server forward events to the Event Handler
acting as an event server.
To do that, edit the Event Integration Facility (EIF) configuration file,
om_tec.config, which is located in the following directory on the server where
Tivoli Enterprise Monitoring Services is installed:
On a Windows system: C:\IBM\ITM\cms\TECLIB
747
Parameter Value
Parameter Description
FilterMode
IN
Filter:Class
ITM_Services_Inventory_610;
FilterCache:Class
ITM_Services_Inventory_610;
Important:
If the EIF configuration file already contains values for any of the
parameters listed above, you should replace the current values with the
values described in the table.
The EIF configuration file also contains other parameters, including
ServerLocation and ServerPort parameters which are set to the values
you configured during the procedure described above. However, you must
use this procedure described to specify the hostname and port number for
the Event Handler rather than editing the EIF configuration file directly with
these values.
Note: For more information about configuring IBM Tivoli Monitoring to forward
events, see the IBM Tivoli Monitoring Version 6.1 Administrators Guide topics
on configuring Tivoli Event Console integration.
The next step is to ensure the kd4.map file is copied to the directory where the
EIF configuration file is located. The kd4.map file is available on the ITCAM for
SOA V6.1 installation media and also in the itcam4soa-tec-file.zip file that is
748
included in the sa04.zip and sa04.tgz files that are downloaded from the Event
Handler SupportPAC Web page.
You then need to restart the Tivoli Enterprise Monitoring Server for these
changes to take effect:
For Windows monitoring servers only, use the Manage Tivoli Enterprise
Monitoring Services application to start the monitoring server.
For UNIX and Linux monitoring servers, do the following:
At the command line change to the /opt/IBM/ITM/bin directory (or the
directory where you installed IBM Tivoli Monitoring).
Run the following commands:
./itmcmd server stop
./itmcmd server start
tems_name
tems_name
Working example
In our working example, we start by reconfiguring TEMS using the Tivoli
Enterprise Monitoring Services application (Windows system). We right-click
the Tivoli Enterprise Monitoring Server and click Reconfigure as shown in
Figure 15-50 on page 750.
749
750
We specify the TEC event server location using the IP address and the port of
the Event Handler as shown in Figure 15-52.
ServerLocation=9.42.170.137
ServerPort=1111
751
RetryInterval=5
getport_total_timeout_usec=50500
NO_UTF8_CONVERSION=YES
ConnectionMode=co
BufferEvents=YES
BufEvtMaxSize=4096
BufEvtPath=./TECLIB/om_tec.cache
FilterMode=IN
Filter:Class=ITM_Services_Inventory_610;
FilterCache:Class=ITM_Services_Inventory_610;
Note: We just need to add/update the FilterMode, Filter:Class and
FilterCache:Class properties as the rest of the properties have been updated
in the previous steps using the graphical interface.
We copy the kfd4.map file in the C:\IBM\ITM\cms\TECLIB\ folder.
Using the Tivoli Enterprise Monitoring Services application we then restart
TEMS so that our changes take effect.
752
Parameter Value
Parameter Description
ServerLocation
ServerPort
Value description
DIR
RuleBase
Set this variable to the rule base that was specified when IBM
Tivoli Enterprise Console event synchronization was installed on
the event server.
RuleBasePath
Set this variable to the rule base path that was specified when IBM
Tivoli Enterprise Console event synchronization was installed on
the event server.
753
./install_itcam_rb.sh
7. Restart Tivoli Enterprise Console
Important: Also ensure the kd4.map file is copied to the following directory on
the system where Tivoli Enterprise Monitoring Server is installed:
On a Windows system: C:\IBM\ITM\cms\TECLIB
On a UNIX or Linux system: /opt/IBM/ITM/tables/host name/TECLIB
where /opt/IBM/ITM and C:\IBM\ITM are the default locations where the Tivoli
Enterprise Monitoring Server is installed and host name is the value supplied
during the Tivoli Enterprise Monitoring Server configuration.
The kd4.map file is available on the ITCAM for SOA V6.1 installation media and
also in the .zip file that you downloaded in step 2 above.
The steps above install a re-send rule that forwards all ITCAM for SOA events to
the Event Handler. All events, except events with the severity set to Harmless,
are sent to the Event Handler.
754
755
756
You can modify the sampling interval to augment the frequency with which the
situation is evaluated, or change the threshold of the Fault Count to adjust its
sensitivity.
757
Service Provider
Service
Consumer
getPrice(ItemName)
Item price is returned
ItemPriceService
ItemPriceDiscountedService
Service
Registry
& Repository
Monitoring &
Management
758
The situation is also displayed in the Situation Event Console view as shown in
Figure 15-58.
Figure 15-58 Situation Fault_610 displayed in TEP Situation Event Console view
759
760
Figure 15-60 AvgResponseTime custom property added to ItemPrice service port in WSRR
2006.12.14 14:24:26.906
com.tivoli.tec.event_delivery.transport.socket.SocketTransport decodeEvent
Decoding event using the encoding: UTF8
761
762
adapter
adapter
adapter
adapter
3
3
3
[severity] = HARMLESS
[interval_begin_time] = 1061214192500000
[situation_origin] =
adapter
adapter
3
3
[adapter_host] = ITCAM4SOA:ITSO-WMB:D4
[operation_namespace_u] =
adapter
adapter
adapter
adapter
adapter
adapter
adapter
adapter
adapter
adapter
adapter
adapter
3
3
3
3
3
3
3
3
3
3
3
3
[cms_port] = 3661
[sub_source] = D4:18c837b2:9-server1
[table_version_u] = 1
[interval_status] = 2
[std_dev_msg_length] = 103
[fault_count] = 1
[min_msg_length] = 240
[situation_name] = Fault_610
[application_servername_u] = server1
[master_reset_flag] =
[avg_elapsed_time] = 5000
[situation_displayitem] =
adapter
adapter
adapter
adapter
adapter
adapter
3
3
3
3
3
3
[application_serverenv] = 1
[max_elapsed_time] = 5000
[hostname] = ITSO-WMB
[elapsed_time_msg_count] = 4
[local_ipaddress_u] = 9.42.170.143
[unique_key_u] =
adapter
[application_server_nodename_u] =
adapter
adapter
adapter
3
3
3
[source] = ITM:Truncated
[interval_end_time] = 1061214193000000
[sub_origin] =
adapter
adapter
3
3
[std_dev_elapsed_time] = 0
[application_server_cellname_u] =
adapter
adapter
adapter
adapter
3
3
3
3
[msg_count] = 8
[origin_node] = D4:18c837b2:9-server1
[service_type] = 1
[cms_hostname] =
adapter
[operation_name_u] = getPrice
14:24:26:922
14:24:26:922
14:24:26:922
14:24:26:922
EST]
EST]
EST]
EST]
000000e7
000000e7
000000e7
000000e7
integrationmo
integrationmo
integrationmo
integrationmo
1
1
1
1
763
764
Service Provider
Service
Consumer
getPrice(UnknownItemName)
Fault is returned
ItemPriceService
Fault
ItemPriceDiscountedService
Fault
Monitoring &
Management
Event
Situation Open
Properties
Fault_610
Situation Open
Fault_610 situation is
triggered after the end
of the sampling
interval and a
situation event is fired
765
A corresponding situation event is fired and sent to the Event Handler which
captures and processes it. As a result, the AvgResponseTime custom property on
the ItemPrice service port object in WSRR is set to cleared as specified when
configuring the Event Handler EventMapping (see Working example on
page 749).
Figure 15-63 on page 767 displays the updated custom properties on the
ItemPrice service port object in WSRR.
766
767
Service Provider
Service
Consumer
getPrice(ItemName)
Item price is returned
ItemPriceService
ItemPriceDiscountedService
Monitoring &
Management
Event
Situation Cleared
Properties
Fault_610
Situation Cleared
Fault_610 situation is
cleared after the end
of the sampling
interval and a
situation event is fired
Figure 15-66 on page 769 shows the corresponding event in the Situation Event
Console view.
768
Figure 15-66 Stopped situation event in TEP Situation Event Console view
769
Service Provider
Service
Consumer
getPrice(ItemName)
St
o
ItemPriceService
ItemPriceDiscountedService
Fa
ul
t_
61
0
Si
tu
at
Service
Registry
& Repository
Monitoring &
Management
Event
Situation Stopped
Properties
Fault_610
Situation Stopped
Fault_610 situation is
stopped and a
situation event is fired
Note: The same behavior would have occurred if we had removed the
Fault_610 situation instead of just stopping it.
770
16
Chapter 16.
771
16.1 Introduction
This chapter describes the use of WebSphere Service Registry and Repository
in an Enterprise Service Bus (ESB) environment, using WebSphere Message
Broker (WMB) as the ESB implementation. Use of WSRR allows ESB mediations
that interact with some set of endpoint services to be more tolerant of changes
within the environment. This is enabled by the ESB using WSRR as a dynamic
lookup mechanism, providing information about service endpoints (the service
metadata). So, when changes occur in the service endpoint environment, the
associated ESB mediations do not have to change.
The interaction between WMB and WSRR is provided by an IBM product
extension for WMB, the WebSphere Message Broker V6 Client for WebSphere
Service Registry and Repository. This is provided as a Category 1 SupportPac,
IA9L, available from the WMB SupportPac URL:
http://www.ibm.com/support/docview.wss?uid=swg24013639
The support encompasses a set of WMB nodes that can be used when building
WMB flows. These nodes encapsulate the API calls to WSRR and a caching
mechanism to improve the efficiency of the interaction.
Section 16.4, WebSphere Message Broker Client for WSRR on page 786
includes more information about the component parts of the client and how it
works.
772
Integrating the applications is a more practical and cost effective solution than
the alternative of re-writing the existing applications.
WebSphere Message Broker is used in the implementation of an application
integration architecture because it provides a mechanism for connecting, routing,
and transforming business data from a variety of transports without any need to
change the underlying applications generating the data.
WebSphere Message Broker enhances the flow and distribution of information by
enabling the transformation and intelligent routing of messages without the need
to change either the applications that are generating the messages or the
applications that are consuming them. In WebSphere Message Broker,
connectivity is provided by applications that communicate by sending and
receiving messages.
WebSphere Message Broker also has the following key capabilities that make it a
valuable solution for business integration:
Distributes any type of information across and between multiple diverse
systems and applications, providing delivery of the correct information in the
correct format and at the correct time
Reduces the number of point-to-point interconnections and simplifies
application programming by removing integration logic from the applications
Routes information in real time based on topic and content to any endpoint
using a powerful publish/subscribe messaging engine
Validates and transforms messages in-flight between any combination of
different message formats, including Web Services, and other XML and
non-XML formats
Routes messages based on (evaluated) business rules to match information
content and business processes
Improves business agility by dynamically reconfiguring information distribution
patterns without reprogramming end-point applications
Access control to securely deliver personalized information to the right place
at the right time
773
Message routing
WebSphere Message Broker provides connectivity for both standards based and
non-standards based applications and services. The routing can be simple
point-to-point routing or it can be based on matching the content of the message
to business rules defined to the broker.
WebSphere Message Broker contains a choice of transports that enable secure
business to be conducted at any time and any place, providing powerful
integration using mobile, telemetry, and Internet technologies. WebSphere
774
Message Broker is built upon WebSphere MQ and therefore supports the same
transports. However, it also extends the capabilities of WebSphere MQ by adding
support for other protocols, including real-time Internet, intranet, and multicast
endpoints.
WebSphere Message Broker supports the following transports:
In addition to the supplied transports, the facility exists for users to write their own
input nodes to accept messages from other transports and formats as defined by
the user.
775
a message definition of their structure must exist. The Message Brokers Toolkit
contains facilities for defining messages to the message broker. These facilities
are discussed in more detail below.
Publish/subscribe
The simplest way of routing messages is to use point-to-point messaging to send
messages directly from one application to another. Publish/subscribe provides an
alternative style of messaging in which messages are sent to all applications that
have subscribed to a particular topic.
The broker handles the distribution of messages between publishing applications
and subscribing applications. As well as applications publishing on or subscribing
to many topics, more sophisticated filtering mechanisms can be applied.
An improved flow of information around the business is achieved through the use
of publish/subscribe and the related technology of multicast. These flexible
distribution mechanisms move away from hard-coded point-to-point links.
Development environment
The development environment is where the message flow applications that
provide the logic to the broker are developed. The broker uses the logic in the
message flow applications to process messages from business applications at
run time. In the Message Brokers Toolkit, you can develop both message flows
and message sets for message flow applications.
Message flows
Message flows are programs that provide the logic that the broker uses to
process messages from business applications. Message flows are created by
connecting nodes together, with each node providing some basic logic. A
selection of built-in nodes is provided with WebSphere Message Broker for
performing particular tasks. These tasks can be combined to perform complex
manipulations and transformations of messages.
A choice of methods is available for defining the logic in the message flows to
transform data. Depending on the different types of data or the skills of the
message flow application developer, the following options are available:
776
The nodes in the message flows define the source and the target transports of
the message, any transformations and manipulations based on the business
data, and any interactions with other systems such as databases and files.
Message sets
A message set is a definition of the structure of the messages that are processed
by the message flows in the broker. As mentioned previously, in order for a
message flow to be able to manipulate or transform a message, the broker must
know the structure of the message. The definition of a message can be used to
verify message structure, and to assist with the construction of message flows
and mappings in the Message Brokers Toolkit.
Message sets are compiled for deployment to a broker as a message dictionary,
which provides a reference for the message flows to verify the structure of
messages as they flow through the broker.
Runtime environment
The runtime environment is the set of components that are required to deploy
and run message flow applications in the broker.
Broker
The broker is a set of application processes that host and run message flows.
When a message arrives at the broker from a business application, the broker
processes the message before passing it on to one or more other business
applications. The broker routes, transforms, and manipulates messages
according to the logic that is defined in their message flow applications.
A broker uses WebSphere MQ as the transport mechanism both to communicate
with the Configuration Manager, from which it receives configuration information,
and to communicate with any other brokers to which it is associated.
Each broker has a database in which it stores the information that it needs to
process messages at run time.
777
Execution groups
Execution groups enable message flows within the broker to be grouped
together. Each broker contains a default execution group. Additional execution
groups can be created as long as they are given unique names within the broker.
Each execution group is a separate operating system process and, therefore, the
contents of an execution group remain separate from the contents of other
execution groups within the same broker. This can be useful for isolating pieces
of information for security because the message flows execute in separate
address spaces or as unique processes.
Message flow applications are deployed to a specific execution group. To
enhance performance, the same message flows and message sets can be
running in different execution groups.
Configuration Manager
The Configuration Manager is the interface between the Message Brokers Toolkit
and the brokers in the broker domain. The Configuration Manager stores
configuration details for the broker domain in an internal repository, providing a
central store for resources in the broker domain.
The Configuration Manager is responsible for deploying message flow
applications to the brokers. The Configuration Manager also reports back on the
progress of the deployment and on the status of the broker. When the Message
Brokers Toolkit connects to the Configuration Manager, the status of the brokers
in the domain is derived from the configuration information stored in the
Configuration Managers internal repository.
Broker domain
Brokers are grouped together in broker domains. The brokers in a single broker
domain share a common configuration that is defined in the Configuration
Manager. A broker domain contains one or more brokers and a single
Configuration Manager. It can also contain a User Name Server. The
components in a broker domain can exist on multiple machines and operating
systems, and are connected together with WebSphere MQ channels.
A broker belongs to only one broker domain.
778
The User Name Server provides authentication for topic-level security for users
and groups that are performing publish/subscribe operations.
16.3 Installation
For the purposes of this book we will assume that you already have WebSphere
Message Broker V6 installed and working. If not, refer to the WMB Information
Center for documentation about how to install WebSphere Message Broker:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp
16.3.2 Prerequisites
The SupportPac provides WSRR nodes and functionality to be used with
WebSphere Message Broker V6.0.0.2 (and later) product. WebSphere Service
Registry and Repository is also required. For normal use there are no other
prerequisites.
In order for the cache synchronization to function using a SIBus (the default for
both WebSphere and WSRR), the JMS Client will need to be available. It can be
obtained from:
779
http://www.ibm.com/support/docview.wss?uid=swg24012804
If global security is enabled for the WebSphere Application Server then a WMB
fix to enable secure access to the SIBus is also needed. This fix is included in
WMB FixPack 3 (V6.0.0.3). WMB FixPack 3 can be downloaded from:
http://www.ibm.com/support/docview.wss?rs=849&uid=swg24013952
Note: The WMB V6 Client for WebSphere Service Registry and Repository
uses JAR files from both WSRR and from either WebSphere Application
Server or the WebSphere Application Client. These JAR files must be
available for the WMB Client to operate, they are not provided with the
SupportPac itself.
Install WMB
For the purposes of this book we will assume that you have WMB installed. If you
do not, then consult the WMB documentation about how to do so:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp
780
781
set CLASSPATH=%CLASSPATH%;<JMSCLIENT_INSTALL>\lib\sibc.jms.jar;<sibc
directory>\lib\sibc.jndi.jar
Where <WMBCLIENTFILES> is the directory you gathered all the files to in the
previous step.
Where <JMSCLIENT_INSTALL> is the directory you installed the JMS client to in a
previous step.
Ensure you restart the command environment to pick up these changes.
782
Update the endpointaddress to reflect the correct hostname and port for
your WSRR installation. Note you need to specify whether to use HTTP or
HTTPS too.
Change all references to the default alias to a value you prefer
An example wsrr.properties file is shown in Example 16-1, note that the
password values will all be set in step 7 by running wsrrsetparams.
Example 16-1 Example wsrr.properties file
DEFAULT_ALIAS = ITSO
ITSO.endpointaddress =
https://itso-wsrr:9443/WSRRCoreSDO/services/WSRRCoreSDOPort
ITSO.keyStore =
C:/Progra~1/ibm/MQSI/WMB-WSRRClient/clientfiles/DummyClientKeyFile.jks
ITSO.keyStorePassword = (DES)+BjuKS5EWVY=
ITSO.keyfile =
file:/C:/progra~1/IBM/MQSI/WMB-WSRRClient/clientfiles/WSRRProxyConfig.key
ITSO.needCache = true
ITSO.password = (DES)KdB6OwaJfJXIWyDoLB9lCA==
ITSO.predefinedQueries =
ITSO.refreshQueriesAfterNotification = true
ITSO.timeout = 10000000
ITSO.trustStore =
C:/Progra~1/ibm/MQSI/WMB-WSRRClient/clientfiles/DummyClientTrustFile.jks
ITSO.trustStorePassword = (DES)+BjuKS5EWVY=
ITSO.userid = (DES)dqndmirQTCzIWyDoLB9lCA==
5. Confirm that the URL provided in the properties file correctly addresses
WSRR:
Navigate using a Web browser to the value used in ITSO.endpointaddress
this should produce a Web page indicating a test Web service has been
called.
6. Edit the <WMBCLIENTFILES>\MBClientAccessToWSRR\wsrrsetparms.bat (or.sh)
file:
Provide a path to a java runtime, it is likely the one provided in the script
doesn't exist.
set JAVA_HOME=C:\IBM\WebSphere\AppServer\java
Provide the full path to the key file mentioned above
set
WSRR_PROXY_KEY=file:/C:/Progra~1/IBM/MQSI/WMB-WSRRClient/clientf
iles/WSRRProxyConfig.key
783
784
sdo-int.jar
ServiceRegistryClient.jar
wsrr.properties (the file created in step 4 on page 782 above)
ibm-jaxrpc-client.jar
4. Start the WMB Toolkit with the -clean option to refresh the toolkit with the new
plugin
<MBToolkitInstall>\6.0\wmbt.exe -clean
Where <MBToolkitInstall> is the WMB Toolkit install directory.
785
786
WSRR Node
Execution Group
WSRR
Proxy
(cache)
Flow
Flow
WSRR Node
WSRR
Proxy
(cache)
WSRR
Nodes
Flow
The two primary parts of the client are the WMB nodes and a WMB cache for
WSRR entities.
787
WSRR Node
Execution Group
WSRR
Proxy
(cache)
Flow
Flow
WSRR Node
WSRR
Proxy
(cache)
WSRR
Nodes
Flow
Application
Application
Application
WSRR
UI
WSRR
3
Database
The runtime sequence of execution starts with the execution of the mediation:
1. When the mediation flow is executed, and the client node is invoked, the node
uses the information specified at development time to access the entitys
metadata. It does this by accessing a WMB client for WSRR proxy, which
looks for the entity in the cache before accessing WSRR.
2. When an entity is requested by the WSRR proxy, the proxy checks to see if
that service is available from the cache. If the service (metadata) is available
from the cache the proxy returns that information to the requesting node. If
the service is not available from the cache the proxy retrieves the service
directly from the WSRR and stores it in its cache for future use. See 16.6,
WMB Client Cache for WSRR on page 800 for more information about
cache strategy options.
3. When a service is requested from the WSRR, it communicates with the
datastore to obtain the service metadata. It returns this metadata to the
requestor.
4. If changes are made to a service, via the WSRR UI (Web-based or command
line) the WSRR fires a notification event with details of the change.
5. When a service notification event is received by the WMB client for WSRR
proxy its cache is updated to contain the new metadata. For details about how
788
this notification event is obtained and processed by the proxy, refer to the
cache details, 16.6, WMB Client Cache for WSRR on page 800.
WSRR Node
Flow
Execution Group
WSRR
Proxy
(cache)
Flow
WSRR Node
WSRR
Proxy
(cache)
WSRR
Nodes
Flow
Cache shared
within an Execution
Group
Deployed for a
broker instance
The WMB flows are deployed in WebSphere Message Broker, within a specified
Execution Group. These flows represent the exposed service and control the
actual service that is invoked, any message transformation that needs to occur,
as well as other mediation specific details.
Cache Scope: The WMB client proxy handles the request for service metadata,
retrieving that metadata from either its cache or from WSRR. The default
deployment for the cache is within a WMB execution group. This means that
each execution group contains its own separate cache. Refer to 16.6, WMB
Client Cache for WSRR on page 800 for details on the deployment options for
the cache.
Node Scope: The WMB client nodes are deployed across an entire WMB
installation. This means that the nodes are available across all brokers and
execution groups.
789
790
Node Name
Node Purpose
SRGetVirtualService
SRProcessVirtualService
SRDispatchVirtualService
Node Name
Node Purpose
SRRetrieveITService
SRRetrieveEntity
Node properties
The properties on the node are: namespace, name, version, relationship type
name, and relationship type value. These are shown in Table 16-2.
Table 16-2 SRGetVirtualService node properties
Property Name
Mandatory
Configurable
Name
Yes
Yes
Namespace
Yes
Yes
Version
Yes
Yes
Relationship type
Yes
Yes
Default
Values
Property
Values
verb
Node terminals
Table 16-3 on page 792 shows the terminals for this node.
791
Description
In
Out
Failure
792
Use of this destination is primarily related to use by the WMB built-in node
RouteToLabel, as seen in Figure 16-4, but can also be used in a non-WMB
environment.
The destination can be overridden using normal WMB toolkit functionality.
Node properties
This node has no properties.
Node terminals
Table 16-4 shows the terminals for this node.
Table 16-4 SRProcessVirtualService node terminals
Terminal Name
Description
In
793
Terminal Name
Description
Out
Failure
Node properties
This node has no properties.
Node terminals
Table 16-5 shows the terminals for this node.
Table 16-5 SRDispatchVirtualService node terminals
794
Terminal Name
Description
In
Out
Failure
Node properties
The properties on the node are: name tuple, user properties, classification and
MatchPolicy. These are shown in Table 16-6.
Table 16-6 SRGetVirtualService node properties
Property
Name
Mandatory
Configurable
Default
Values
Name tuple
(portType
name,
namespace
and version)
No
Yes
User
properties
No
No
Classification
No
Yes
MatchPolicy
Yes
Yes
One
Property Values
If all three values are specified for the Name tuple then all ports that implement
the single service portType will be returned (if they exist). At least one of the
three is required. If any of the three are left blank, then all ports that implement
multiple service portTypes will be returned (if a match is found).
795
Note: While the Name tuple, user properties and Classification fields are not
mandatory, a warning will be issued if none of the three properties are set.
Figure 16-5 shows a sample properties dialog for the SRRetrieveITService node.
Node terminals
Table 16-7 shows the terminals for this node.
Table 16-7 SRRetrieveITService node terminals
796
Terminal Name
Description
In
Out
Terminal Name
Description
Failure
Nomatch
Operational sequence
The following is the sequence that this node follows:
1. Receives a message
2. Retrieves the IT service endpoint information from WSRR using the specified
query string
3. If one or more matches can be found:
a. If MatchPolicy is One and a single endpoint is matched, the proper
endpoints will be set in the domain so that existing WMB built-in nodes can
be used to invoke the service.
b. If MatchPolicy is All, adds all matching endpoints information to the
message instance, leaving all other message content unchanged.
c. Propagates this to the out terminal
4. If a match cannot be found:
a. Propagates the input message to the nomatch terminal
5. On failure
a. Adds FailInfo to the unchanged message content leaving all other
message elements unchanged
Node properties
The properties on the node are: name tuple, template, user properties,
classification and MatchPolicy. These are shown in Table 16-8.
797
Mandatory
Configurable
Default
Values
Name tuple
(portType
name,
namespace
and version)
No
Yes
Template
No
Yes
User
properties
No
No
Classification
No
Yes
MatchPolicy
Yes
Yes
One
Property Values
If all three values are specified for the Name tuple then all ports that implement
the single service portType will be returned (if they exist). At least one of the
three is required. If any of the three are left blank, then all ports that implement
multiple service portTypes will be returned (if a match is found).
Note: While the Name tuple, template, user properties and Classification
fields are not mandatory, a warning will be issued if none of the four properties
are set.
Figure 16-6 on page 799 shows a sample properties dialog for the
SRRetrieveEntity node.
798
Node terminals
Table 16-9 shows the terminals for this node.
Table 16-9 SRRetrieveEntity node terminals
Terminal Name
Description
In
Out
Failure
799
Terminal Name
Description
Nomatch
Operational sequence
The following is the sequence that this node follows:
1. Receives a message
2. Retrieves the entity metadata information from WSRR using the specified
query string
3. If one or more matches can be found:
a. If MatchPolicy is One adds a single piece of metadata information to
the message instance, leaving all other message content unchanged.
b. If MatchPolicy is All, adds all matching metadata information to the
message instance, leaving all other message content unchanged.
c. Entity metadata information will be available for additional processing
(either by ESQL or a JavaComputeNode)
d. Propagates this to the out terminal
4. If a match cannot be found:
a. Propagates the input message to the nomatch terminal
5. On failure
a. Adds FailInfo to the unchanged message content leaving all other
message elements unchanged
800
The proxy provides a basic API and utilizes the cache content to provide efficient
access to WSRR content at runtime. The cache itself stores both the query
objects (containing a reference to all bsrURI objects that represent the result of
the query as returned by WSRR) and the individual WSRR objects along with
basic statistics on the objects such as updatedTimestamp,
lastAccessedTimestamp and the number of times the object has been accessed
from the cache.
The logical topology of the WSRR cache can be seen in Figure 16-7.
Message Broker
Specific
WSRR
Nodes
WSRR Cache
WSRR
Proxy
API
WSRR
Proxy (Cache)
Configuration
WSRR
WSRR
Proxy &
Cache
WSRR
EJB
Client
Cache
Synchronize
WSRR
Web Service
API
Notification
Publish
JMS
Pub/Sub
Notification
Subscribe
801
time by a client. Thereafter the object is stored up in the cache and returned
from the cache for subsequent queries for the same object. The object is
retained in the cache until the object is invalidated due to synchronization or
other means.
Preload
The third option is to specify preload wherein the cache instance is populated
with objects from WSRR prior to the object being queried by a client. The
cache configuration file controls the objects to be preloaded by specifying a
classification or a set of classifications objects belonging to which are
queried and pre-loaded by the proxy into the cache. The object is retained in
the cache until the object is invalidated due to synchronization or other
means.
802
and different query is specified, the proxy would not find an existing index for this
new query string, and will thus issue the query against WSRR. If the same entity
is returned, the existing cached entity will be updated, and a new index created
(for the new query string). If a different entity is returned, it is stored in the cache
and two indexes are created (query string and tuple).
Context
As seen in the SOA Characteristics section in the SOA Compass book, the
characteristics of platform, location, protocols, and versioning all need to be
understood, to one degree or another, by the requesters of a specific service.
Enterprises may choose different ways to implement a service and the
implementation may change over the life of the service.
803
Forces
If the requester and provider are both under full control of the Enterprise, then
establishment of a unified protocol (location, and so on) and the planning and
scheduling of changes (that affect both parties) can be largely controlled. This
can lead to a preferred communication between the requester and provider,
which may result in a performance increase. However, if both the requester
and provider are not under full control of the Enterprise, then isolating the
requester from the implementation details can provide benefits to the provider
(the Enterprise) and the requester.
Multiple implementations of the same semantic service provide distinct
benefit to the Enterprise. For instance, the same semantic service may be
provided by both a SOAP/HTTP implementation and a XML/MQ
implementation; without the requester knowing these details.
New versions of a service may require new (or different) transformations. For
instance, a services change in implementation from SOAP/HTTP to XML/MQ
for performance reasons or a new version of a service coming online requiring
a different signature can be performed with no impact to the client.
Solution
This is a WSRR virtual service in that it does not provide business functionality;
however, it does represent the exposed business functionality and implements
the pattern.
For instance, suppose an enterprise provides a service that represents
functionality for a customer or about a customer. The functional and
non-functional specification (the functionality delivered and quality of availability)
defines the service, at least at the business partnership level. Regardless of the
implementation of the service, the business can specify the functionality that a
service will provide and the quality of that service and/or the availability of that
service.
Suppose this service is implemented as a Web Service; however, in order to
provide a specific quality of service it is re-implemented as a MQ-based
service. In other words, the implementation of the service has at least changed
the protocol, message format (probably), and location (service executable
endpoint). This change will require changes to all requesters, internal and
804
external. Coordination of the change(s) will impact the both requesters and
providers in multiple ways.
Within an Enterprise Service Bus the Transcoder mediation pattern provides (or
represents) a common semantic for the business service. It is responsible for
determining which operational service to invoke to execute the request, based on
message context, message content, and/or other data. Depending on this
information the mediation can transform the message (as required), change the
destination (location), and choose which operational service to use to fulfill the
request. New IT services can be brought online, old ones retired, and the
complete service lifecycle followed without affecting the clients.
In effect the mediation encapsulates the underlying operational service
implementation(s) into a single semantic service that uses a single canonical
interface. The mediation can determine if there is a preferred implementer, use a
different operational service provider to provide a different QoS to meet specific
SLAs, or route to a specific service for other business or technical reasons.
Figure 16-8 shows an enterprises view of the virtual service (ESB mediation). In
the figure all the IT service providers are assumed to provide the same
semantics, but maybe using different syntax.
ESB mediations
control which IT
service provider is
invoked
MQ based
Service Provider
Client
Internal
Requester
Web Service
Based
Service Provider
Web Service
Based
Service Provider
805
Consequences
A direct consequence of the ESB Transcoder pattern is that there is a single
canonical semantic representation of the exposed service, regardless of the
actual implementation of the operational service. This semantic could be a Web
Service that is exposed to requesters or some other interface type. This virtual
service is responsible for all transformations required to invoke the operational
service.
Another consequence is that this virtual service needs to have each supported
operational service known to it. This means that relationships between this
service, that implements the transcoder pattern, and the operational service that
actually provides the functionality must be established. This can be hard-coded
into this service, or can be externalized in WSRR.
Implementation
The most flexibility is obtained by externalizing the relationships between the
virtual service (that implements the transcoder pattern) and the operational
services.
The virtual service that implements the transcoder pattern contains relationships
to the operational services. The relationships metadata is used by this service in
order to determine which relationship, and thus which targeted operational
service, to select. In the logical model, the metadata that is used in the selection
is called endpointAlias (see the Endpoint object). However, the actual metadata
could be much more complex.
The Routing Label relationship property is used by the transcoder service to
branch or execute a specific piece of functionality. For instance, a message may
need to be transformed before it can be passed to a specific operational service.
Refer to 16.8, Setting up your environment for the patterns on page 809 on how
to realize this pattern in WSRR and using the pattern-based nodes in WMB.
806
example. This pattern requires update access to the context of the message and
read access to the payload if it is needed for the routing-selection criteria.
Another way for the Enterprise to achieve looser coupling is to use a router. The
router really is intended to do what classically has been called
distribution/aggregation, that is, parsing the incoming request, sending individual
requests to appropriate service, handling responses. Response aggregation can
occur with synchronous protocols or can be avoided with asynchronous
protocols. Internal requesters normally interface with the virtual service that
performs the mediation. However, they could interface with the router virtual
service. The router can handle multiple message formats (for example, XSD
schemas) and perhaps even aggregated messages.
Context
As seen in the SOA Characteristics section in the SOA Compass book (Service
Oriented Architecture (SOA) Compass by IBM Press, ISBN 0-13-187002-5), the
characteristics of platform, location, protocols, and versioning all need to be
understood, to one degree or another, by the requesters of a specific service.
Enterprises may choose different ways to implement a service and the
implementation may change over the life of the service.
Services come online, to provide new functionality or replace existing services
(for example, that have become obsolete).
These changes, depending on the implementation, can adversely affect clients.
Use of the pattern allows the Enterprise to reduce the impact to clients and
increase the flexibility of their (the Enterprise) choices for implementing services.
Forces
If the enterprise wants to provide a single (or small set) of access points. The
router provides dynamic context routing, commonly using the message
content to aid that routing process.
If the enterprise wants to perform specific routing decisions, for instance
combining message content with service metadata to determine preferred
machines, service locations, and so on.
If the enterprise needs to route certain requesters to different services,
perhaps to fulfil a SLA.
Solution
This is a virtual service in that it does not provide business functionality; however,
it does represent the exposed business functionality. In this case it is usually a
single gateway for all services or for a classification of services. For instance,
807
Virtual Service
Virtual Service
Distribution / Aggregation
Virtual Service
(Router)
Client
Internal
Requester
Virtual Service
Consequences
A direct consequence of the ESB Router pattern is that there is a single (or small
set) location for requesters to access. The enterprise can then determine how to
process a specific request. For instance, when a new version of a service comes
online, the enterprise may choose to route a specific list of requesters (perhaps
the beta users) to the new version.
Another consequence is that this virtual service needs to have a relationship to
each service it is capable of routing to; whether the service is another virtual
service or an operational service. If this routing needs to be dynamic, then the
necessary metadata needs to be externalized.
Implementation
The most flexibility is obtained by externalizing the relationship metadata
between the router virtual service and the service to which it can route.
808
Refer to 16.8, Setting up your environment for the patterns on page 809 on how
to realize this pattern in WSRR and using the pattern-based nodes in WMB.
809
810
1. We need to configure the WSRR CLI before we use it to load the new
ontology and UI configuration files into WSRR.
Edit <WSRR_Install>\CLI\config\wsrrcli.conf and ensure all settings are
set correctly for your environment.
If you have an unsecured WSRR installation then configure the open
settings, since our WSRR server has WebSphere security turned on we will
configure the secure settings. The relevant portion of wsrrcli.conf for our
environment can be seen in Example 16-2.
Example 16-2 Sample wsrrcli.conf configuration file
811
4. Edit
<WMBClient_Install>\Tests\WSRRTestEntities\SampleVirtualServices\cre
ate_sample_services.bat (in our case on the WSRR CLI machine).
Make sure the ALIAS is set to the correct alias from your wsrrcli.conf, in our
case secure. If you have security turned on then make sure the USER_ID
and PASSWORD are also set correctly to a user ID that can access WSRR.
5. Edit
<WMBClient_Install>\Tests\WSRRTestEntities\SampleVirtualServices\Dem
oCustomer.wsdl and
<WMBClient_Install>\Tests\WSRRTestEntities\SampleVirtualServices\Dem
oVehicle.wsdl (in our case on the WSRR CLI machine).
Make sure the wsdlsoap:address location at the bottom of the files is set to
the correct hostname and port for the machine you are deploying the
DemoServiceEAR to. In our case that is the WSRR machine itself. You may
also need to change it to https if you are using WebSphere security.
6. Run the following script and if prompted enter the correct userID and
password for a user able to access WSRR:
<WMBClient_Install>\Tests\WSRRTestEntities\SampleVirtualServices\cre
ate_sample_services.bat
7. Edit
<WMBClient_Install>\Tests\WASTestWebServices\deploy_DemoServiceEAR.b
at (in our case on the WSRR CLI machine).
Change WAS_BIN_HOME to be the correct path to your WebSphere bin
directory. If you have security turned on then make sure the USER_ID and
PASSWORD are also set correctly to a user ID that can access WSRR.
8. Change directory to
<WMBClient_Install>\Tests\WSRRTestEntities\GUIConfiguration
Run the following command:
<WSRR_Install>\CLI\wsrrcli.bat -a secure -c
<WSRR_Install>\CLI\config\wsrrcli.conf -u wasadmin -p passw0rd -w
<WAS_Install>/profiles/default
Where <WSRR_Install> is your WSRR installation directory and
<WAS_Install> is your WebSphere Application Server installation directory.
Replace secure with the name of the alias you are using in wsrrcli.conf
(normally open or secure). Also replace wasadmin and passw0rd with the
correct credentials for your WSRR installation.
It may prompt you for a username and password - if so enter the user ID and
password for your WSRR WebSphere installation. Once complete it should
have reported the installation of numerous configuration files.
812
813
run_addVehicle.bat
This script will invoke the TestFlow with the vehicle message.
It outputs a trace file in C:\VirtualService.log if you need to debug any
problems.
Example 16-3 shows an example of the type of output you should get back from
running the script.
Example 16-3 run_addVehicle.bat example output
run_testCustomer.bat
This script will invoke the TestFlow with the customer message.
It outputs a trace file in C:\VirtualService.log if you need to debug any
problems.
Example 16-4 shows an example of the type of output you should get back from
running the script.
Example 16-4 run_testCustomer.bat example output
814
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/>
<soapenv:Body><p434:updateCustomerResponse
xmlns:p434="http://demo.sr.eis.ibm.com"><updateCustomerReturn>DemoCusto
mer.updateCustomer(A customer
description)</updateCustomerReturn></p434:updateCustomerResponse></soap
env:Body></soapenv:Envelope>
Completed in 12172 ms.
Press any key to continue . . .
Figure 16-10 on page 819 shows the TestFlow message flow as used by
run_testCustomer.bat. It is also described in more detail in TestFlow on
page 818.
run_testEntityFlow.bat
This script will invoke the EntityTestFlow.
It outputs a trace file in C:\RetrieveEntity.log if you need to debug any
problems.
Example 16-5 shows an example of the type of output you should get back from
running the script.
Example 16-5 run_testEntityFlow.bat example output
815
srm:AcknowledgementInterval
Milliseconds="200"/></wsrm:RMAssertion>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy></content></Entity></Result>
Completed in 1766 ms.
C:\Program
Files\ibm\MQSI\WMB-WSRRClient\Tests\ClientForTestExecution>pause
Press any key to continue . . .
Figure 16-12 on page 822 shows the EntityTestFlow as used by
run_testEntityFlow.bat, the message flow is also described in more detail in
EntityTestFlow on page 822.
run_testITService.bat
This script will invoke the ITServiceTestFlow with the customer message.
It outputs a trace file in C:\SRRetrieveITService.log if you need to debug any
problems.
Example 16-6 shows an example of the type of output you should get back from
running the script.
Example 16-6 run_testITService.bat example output
816
Figure 16-11 on page 821 shows the ITServiceTestFlow message flow as used
by run_testITService.bat, the message flow is also described in more detail in
ITServiceTestFlow on page 821.
run_testMQ.bat
This script will invoke the TestFlow with the MQ message.
It outputs a trace file in C:\VirtualService.log if you need to debug any
problems.
Example 16-7 shows an example of the type of output you should get back from
running the script.
Example 16-7 run_testMQ.bat example output
817
TestFlow
Figure 16-10 on page 819 shows the TestFlow message flow.
818
819
4. The Route to mapping node then routes the message based on the
SR-Route-To-Label environment variable in the WMB LocalEnvironment.
This value was set by the SRGetVirtualService node. If it contains vehicle
then the message is routed to the Label-Vehicle node, if it contains
customer then it is routed to the Label-Customer node. Otherwise if it
contains ALL it is routed to the Label-ALL node.
5. If it was a customer message then it now proceeds through the map
customer node, this generates a new message in a different format based on
the input message.
If it was a vehicle message then it now proceeds through the map vehicle
node, this also generates a new message in a different format based on the
input message.
6. All three types of message now flow to the SR Process Service node where
the message is processed. This node is used to create the proper format for
the target service invocation.
7. The message then passes through the Route to Dispatcher node which will
route the message based on the content of the SR-Protocol-Label
environment variable in the WMB LocalEnvironment. If it contains
URLEndpoint the message is routed to the Label-URLEndpoint node,
messages containing MQEndpoint go to the Label-MQEndpoint node, and
those containing JMSEndpoint are routed to the Label-JMSEndpoint node.
8. The service in each message is then dispatched using the relevant
SRDispatchVirtualService node for each type of message. The
SRDispatchVirtualService nodes are used to establish the endpoint of the
target service.
a. URLEndpoint messages retrieve the HTTP service information from
WSRR and then invoke it using the HTTP Request node. This then gives
a HTTP Service Reply.
b. MQEndpoint messages retrieve the MQ service information from WSRR
and then put a MQ message on the appropriate MQ queue. The Display
MQ Submission compute node is then called which sets the relevant
parameters for the MQ Destination queue from variables in the
LocalEnvironment. The final node in the flow for MQ messages gets the
MQ Service Reply.
c. JMSEndpoint messages retrieve the JMS service information from WSRR
and then publish a JMS message using that information. The Display
JMS Submission compute node is then called which sets some Result
parameters based on variables in the LocalEnvironment. The final node in
the flow for JMS messages gets the JMS Service Reply.
820
ITServiceTestFlow
Figure 16-11 shows the ITServiceTestFlow message flow.
This message flow retrieves a PortType from WSRR in the following stages:
1. The starting point for the message is the HTTP Input node which is listening
for a message.
2. The message is then used to trigger the retrieval of a service port type from
WSRR in the SRRetrieveITService node, this checks WSRR for a port type
called DemoCustomer with a given namespace and which has a user
property policy set to RM, and country set to China. It also must have
the specified classification (InitialState1).
3. If the node fails to retrieve the service then the Failure compute node is
called which will set the appropriate result status.
4. If the SRRetrieveITService node did not match a service with the
appropriate criteria then the Post No Match compute node is called which
again sets the appropriate result status.
5. If the document was found then a Customer Mapping node is called which
creates a new message based on the original one.
6. A Trace node is then called to output some appropriate debug information to
a file.
7. The HTTP Request node then opens a connection to the specified URL.
8. Regardless of the path through the flow, it comes to an end with the HTTP
Reply node which will output the reply message to the Web services client
(or the console in the case of the test scripts).
821
EntityTestFlow
Figure 16-12 shows the EntityTestFlow message flow.
This message flow retrieves a Policy document from WSRR in the following
stages:
1. The starting point for the message is the HTTP Input node which is listening
for a message.
2. The message is then used to trigger the retrieval of a policy document from
WSRR in the SRRetrieveEntity node, this checks WSRR for a document
called RMAssertionPolicy with a given namespace and which has a user
property grade set to gold.
3. If the node fails to retrieve the policy document then the Display Failure
compute node is called which will set the appropriate result status.
4. If the SRRetrieveEntity node did not match a policy document with the
appropriate criteria then the Display No Match compute node is called which
again sets the appropriate result status.
5. If the document was found then a Trace node is called to output some
appropriate debug information to a file.
6. Then the Display Entity Content node is called to output the Policy
document content.
7. Regardless of the path through the flow, it comes to an end with the HTTP
Reply node which will output the reply message to the Web services client
(or the console in the case of the test scripts).
822
823
824
17
Chapter 17.
825
17.1 Introduction
Customer Information Control System (CICS) can be integrated with WebSphere
Service Registry and Repository through an additional CICS SupportPac
(CA1N). This SupportPac provides the tools to streamline the job of registering,
discovering and governing Web services resources generated from CICS
applications. Together these tools provide additional support for organizations
intending to move to a Service-Oriented Architecture (SOA).
The new tools enable Web Services Description Language (WSDL) files derived
from CICS application interfaces to be automatically published from the CICS
z/OS environment to WSRR where they can be accessed by other Web
applications. The tools also enable retrieval of Web Service Description
Language files from WSRR, into the z/OS environment where they can be
modified and reverse engineered into new CICS High Level Language
applications (HLLs).
The SupportPac includes:
CWSP - a CICS transaction to publish a WSDL document to WSRR for each
of your CICS programs that are Web service providers
DFHWS2SR - a z/OS batch utility to publish a WSDL document to WSRR
DFHSR2WS - a z/OS batch utility to read a WSDL document from WSRR
When enabling your CICS application to be a Web service provider, you can use
the CICS Web services assistant (DFHLS2WS) provided with CICS TS V3.1 to
generate the WSDL interface from your programs high level language structures.
Use this SupportPac to automate the publication of this WSDL directly from z/OS
to WSRR.
When developing a CICS application that invokes a Web service, use this
SupportPac to automate the retrieval of the WSDL document from WSRR
directly to z/OS. You can then use the CICS Web services assistant
(DFHWS2LS) to generate the high level language structures needed to pass
data to CICS when invoking the Web service.
Note: CICS SupportPac CA1N can be downloaded from:
http://www.ibm.com/support/docview.wss?rs=1083&uid=swg24013629
826
827
828
fully exploit the resources they use. The connectors enable better performance,
scalability, reliability, systems management and security.
The CICS connectors are:
CICS Transaction Gateway: for rapid deployment of CICS applications into an
SOA whilst keeping existing business logic intact.
CICS Universal Client: for delivering low-cost, single-user access to CICS
across an enterprise.
SOAP for CICS: for enabling CICS applications to interact securely and
reliably with Web services, independently of platform, environment or
application language.
MQSeries Integrator Agent for CICS: for application integration with a run time
component and a build time component.
829
Application Development
The WebSphere product portfolio contains an important tool for System z
application development called WebSphere Developer for System z.
WebSphere Developer for System z (formerly called WebSphere Developer for
zSeries) is an integrated application development workbench that runs in
Eclipse. The product is specifically designed for developing System z
applications (the applications that run on CICS mainframe systems).
When a developer uses WebSphere Developer for System z to work with a CICS
application, the tool must be able to locate the resources (programs) that make
up that application. This is possible because an Eclipse plug-in provides an
interface that allows WebSphere Developer for System z to access service
metadata held the WSRR in the form of WSDL files.
On the CICS side of the development fence, the WSRR SupportPac tools
included with CICS Transaction Server enable developers to retrieve application
service metadata files (WSDL files) from WSRR, bring them into the CICS z/OS
environment, and 'reverse engineer' them into new CICS High Level Language
(HLL) applications.
Application Runtime
In an SOA implementation that involves CICS and WebSphere, CICS
applications must be able invoke WebSphere applications as service providers
(for example applications running in WebSphere Application Server). WebSphere
applications must be able to invoke CICS applications as service providers.
WSRR plays a key role in an SOA runtime environment because it holds the
service metadata information (WSDL files) that enable CICS and WebSphere
applications to discover and invoke (call) each other.
This is possible because WSDL files derived from CICS application HLL
structures are published automatically from the CICS z/OS environment to
WSRR. These files can then be accessed by other Web applications that want to
invoke their associated applications.
830
17.3 Installation
This section describes the tasks you need to perform to download and install the
CICS SupportPac, and the software required to run it.
This section is aimed at experienced CICS system programmers who are
responsible for installing and customizing CICS. Knowledge of downloading files
from the internet, uploading files to z/FS, and UNIX commands is assumed.
Options for the cp, pax, and chmod commands are detailed in the z/OS UNIX
System Services Command Reference manual.
831
832
mkdir /install-directory
cd /install-directory
bin
put ca1n\ca1n.pax.Z
quit
4. Expand the ca1n.pax.Z file. For example, from a z/OS UNIX shell enter the
following:
cd /install-directory
pax -rvf ca1n.pax.Z
5. Ensure the appropriate permissions and attributes are set for the files in the
install-directory and its sub-directories. In particular the files in
install-directory/bin need to have their execution permission set. For
example, from a z/OS UNIX shell enter the following:
chmod 755 /install-directory/bin/*
6. Copy the CA1N.JCL.XMIT and CA1N.LOAD.XMIT files to datasets. For
example, from a z/OS UNIX shell enter the following. Substitute hlq for the
high-level qualifier to be used for the SupportPac datasets:
cp -F bin -P "RECFM=FB,LRECL=80"
/install-directory/datasets/CA1N.JCL.XMIT
"//'hlq.CA1N.JCL.XMIT'"
cp -F bin -P "RECFM=FB,LRECL=80"
/install-directory/datasets/CA1N.LOAD.XMIT
"//'hlq.CA1N.LOAD.XMIT'"
7. Expand the hlq.CA1N.JCL.XMIT and hlq.CA1N.LOAD.XMIT datasets to
libraries. For example, from a z/OS TSO shell enter the following:
RECEIVE INDATASET('hlq.CA1N.JCL.XMIT')
When prompted with the message Enter restore parameters... respond with:
DA('hlq.CA1N.JCL')
RECEIVE INDATASET('hlq.CA1N.LOAD.XMIT')
When prompted with the message Enter restore parameters... respond with:
DA('hlq.CA1N.LOAD')
8. The hlq.CA1N.JCL.XMIT and hlq.CA1N.LOAD.XMIT datasets can now be
safely removed.
The following directories and dataset libraries should now exist:
/install-directory/ - high level installation
/install-directory/bin - z/OS UNIX shell scripts
/install-directory/classes - Java class libraries
/install-directory/datasets - z/OS datasets
/install-directory/docs - documentation
/install-directory/licenses - license information
/install-directory/pipeline - CICS pipeline configuration
833
Input Parameters:
WSDL document location, meta
data description, name, version,
encoding, user-defined
name+value, WSRR server
location + security credentials
.
.
DFHLS2WS
Build WSDL and WSBind
file from.Language
Structure(s)
.
.
.
.
DFHWS2SR
.
Publish to WSRR
.
.
WSBind
WSDL
WSRR
log
834
835
LOGFILE=/u/username/tmp/WS2SR.log
LOCATION=/usr/lpp/cicsts/cicsts31/samples/webservices/wsdl/placeOrder.wsdl
NAME=placeOrder
DESC=CICS TS V3.1 Catalog sample place order service
VERSION=3
ENCODING=UTF-8
HOSTPORT=http://wsrr.my-example.server:443
USERNAME=wasadmin
PASSWORD=wasadm1n
KEYSTORE=/u/username/DummyClientKeyFile.jks
KEYPWD=wasadm1n
TRUSTSTORE=/u/username/DummyClientTrustFile.jks
TRUSTPWD=wasadm1n
PROP1NAME=Host
PROP1VALUE=IBM CICS Transaction Server
PROP2NAME=Publisher
PROP2VALUE=CICS SupportPac CA1N
*/
Example 17-2 is an extract from the log file created by DFHWS2S after
submitting the example JACL above in Example 17-1 on page 835.
Example 17-2 DFHWS2S log extract
836
837
Symbolic parameters
The following symbolic parameters are defined in cataloged procedure
DFHWS2SR:
JAVADIR=path
Specifies the name of the Java directory that is used by DFHWS2SR. The
value of this parameter is appended to /usr/lpp/ giving a complete path name
of /usr/lpp/path.
TMPDIR=tmpdir
Specifies the location of a directory in z/FS that DFHWS2SR uses as a
temporary work space. The user ID under which the job runs must have read
and write permission to this directory.
The default value is /tmp
TMPFILE=tmpprefix
Specifies a prefix that DFHWS2SR uses to construct the names of the
temporary workspace files.
The default value is WS2SR
WORKDIR=path
Specifies the location of the directory in z/FS in which the SupportPac was
installed. The user ID under which the job runs must have read permission to
this directory.
838
/tmp/WS2SR.err
Important: DFHWS2SR does not lock access to the generated HFS file
names. Therefore, if two or more instances of DFHWS2SR run concurrently,
and use the same temporary workspace files, there is nothing to prevent one
job overwriting the workspace files while another job is using them. This can
lead to unpredictable failures.
Therefore, you are advised to devise a naming convention, and operating
procedures, that will avoid this situation. For example, you can use the system
symbolic parameter SYSUID to generate workspace file names that are
unique to an individual user.
These temporary files are deleted before the end of the job.
.-CCSID=Cp037-.
>>-+-------------+--+------------+--+----------------+--------------->
'-CCSID=value-' '-DESC=value-' '-ENCODING=value-'
>----HOSTPORT=scheme://-+-domain name-+-:port number---------------->
'-IP address--'
>--+-------------------------------+--LOCATION=value--LOGFILE=value->
'-KEYSTORE=value-+--------------+
'-KEYPWD=value-'
>--+------------+--+----------------------------------------+------->
'-NAME=value-' +-PROP1NAME=value----PROP1VALUE=value----+
+-PROP2NAME=value----PROP2VALUE=value----+
etc.
+-PROP254NAME=value--PROP254VALUE=value--+
'-PROP255NAME=value--PROP255VALUE=value--'
>--+-----------------------------------+---------------------------->
'-TRUSTSTORE=value-+----------------+
'-TRUSTPWD=value-'
.-VERSION=1-----.
>--+---------------------------------+--+---------------+----------><
'-USERNAME=value-+----------------+ '-VERSION=value-'
'-PASSWORD=value-'
Parameter use
You can specify the input parameters in any order.
839
Parameter description
CCSID=Cp037|value
The character encoding used to read the WSDL file from z/FS. A list of
character encodings that can be specified is available in the Supported
Encodings topic in the Java manuals. For Java 1.4, the character encodings
are available from:
http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html
DESC=value
The description of the WSDL used by WSRR to set the Description property.
ENCODING=value
The character set encoding of the WSDL document used by WSRR to set the
Encoding property. If ENCODING is not specified, WSRR obtains this value
from the <?xml encoding="encoding_value"> typically found at the beginning
of the WSDL document.
HOSTPORT=scheme://{domain name|IP address}:port number
The URI of the WSRR server. The scheme can be HTTP or HTTPS. The port
number defaults to 80 for the scheme HTTP, and 443 for HTTPS.
KEYSTORE=value
The fully qualified filename of the Keystore file.
KEYPWD=value
840
Completion Codes
Table 17-1 on page 842 shows the possible completion codes for DFHWS2SR.
841
Meaning
Input Error. The job did not complete successfully. One or more
error messages were issued to SYSOUT whilst validating the
input parameters.
Input Error. The job did not complete successfully. One or more
error messages were issued to SYSOUT whilst validating the
input parameters.
12
Error. The job did not complete successfully. One or more error
messages were issued to SYSOUT during execution.
CICS TS V3.1
Input Parameters:
WSRR server location + security
credentials + description + version
WSDL
WSDL
WSDL
CWSP
Transaction
Publish WSDL
to WSRR
WSRR
log
842
Before performing the steps to run the CWSP transaction, the following needs to
be in place:
The CICS system initialization (SIT) parameter LOCALCCSID must be set to
an EBCDIC code page. The default for LOCALCCSID is EBCDIC codepage
037. If a non-EBCDIC code page is specified, CWSP will ABEND AEXZ.
The WSDL document for the CICS Web service provider application needs to
be available to the CICS region, and specified in the applications associated
WEBSERVICE resource in the WSDLFILE parameter. In addition the CICS
default user ID running CWSP requires read permission on for the WSDL
document.
The CICS region needs access to TCP/IP services to send Web services
requests to the WSRR server (HOSTPORT parameter)
If connectivity to WSRR is required to be via HTTPS, review 17.7, Security
considerations on page 854.
843
CWSP TEST
Complete -
1 published
CWSP writes output messages to the CWSP transient data queue. By default is
redirected to the CSSL which can typically be viewed by viewing the CICS JOB
output in JES. Example 17-5 is an except from publishing CICS Web service
provider to WSRR.
Example 17-5 CICS JOB output
844
.-----------------.
v
|
>>--+-------------+-+--+------------+--+----------------+----------->
'-aName=value-'
'-DESC=value-'
'-ENCODING=
>----HOSTPORT=scheme://-+-domain name-+-:port number---------------->
'-IP address--'
.-VERSION=
>--+-----------------------------------+--+---------------+--------><
'-USERNAME=value--+-----------------+ '-VERSION=
845
'-PASSWORD=value-'
Parameter description
aName=value
WSRR allows for custom properties to be published along with WSDL
documents. Each custom property has a name and value pair. Up to 255
name and value pairs can be specified. Duplicate and blank custom property
names should be avoided.
An example aName=value is Publisher=CICS SupportPac CA1N
DESC=value
The description of the WSDL used by WSRR to set the Description property.
ENCODING=value
The character set encoding of the WSDL document used by WSRR to set the
Encoding property. If ENCODING is not specified, WSRR obtains this value
from the <?xml encoding="encoding_value"> typically found at the beginning
of the WSDL document.
HOSTPORT=scheme://{domain name|IP address}:port number
The URI of the WSRR server. The scheme can be HTTP or HTTPS. The port
number defaults to 80 for the scheme HTTP, and 443 for HTTPS.
PASSWORD=value
The password to access WSRR.
USERNAME=value
The username to access WSRR, and is used by WSRR to set the Owner
property.
VERSION=1|value
The version number of the WSDL used by WSRR to set the Version
property.
An example CWSP configuration file is shown in Example 17-7.
Example 17-7 Example CWSP configuration file
846
Input Parameters:
Language, container, end of URI,
Provider Application Name, etc...
DFHSR2WS
.
Read from WSRR
WSRR
.
.
.
.
.
DFHWS2LS
Build Language
.
Structure(s) & WSBIND
file from. WSDL
.
WSDL
WSBind
Output
Input
log
Language
Structures
Figure 17-3 Reading WSDL files stored in WSRR from z/OS batch
847
The userid under which the DFHWS2SR procedure is run will need authority to:
read files from the SupportPac bin directory (WORKDIR symbolic parameter)
read files from the Java product directories (JAVADIR symbolic parameter)
optionally, read the trust store and key store files (TRUSTSTORE and
KEYSTORE parameters)
write the WSDL file to z/FS (LOCATION parameter)
write access to the temporary directory (TMPDIR symbolic parameter)
write access the log file (LOGFILE parameter)
access to TCP/IP services to send Web services requests to the WSRR
server (HOSTPORT parameter)
If connectivity to WSRR is required to be via HTTPS, review 17.7, Security
considerations on page 854.
848
USERNAME=wasadmin
PASSWORD=password
KEYSTORE=/u/username/DummyClientKeyFile.jks
KEYPWD=wasadm1n
TRUSTSTORE=/u/username/DummyClientTrustFile.jks
TRUSTPWD=wasadm1n
WSDLID=WSRR--c8e644f7.f101e566.614371e8.10def3f4b13.e2af041.2a
*/
Example 17-9 is an extract from the log file created by the DFHSR2WS after
submitting the example JCL above.
Example 17-9 Log extract after running customized version of
hlq.CA1N.JCL(WSDLREAD)
849
xmlns:p244="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/ws/sdo"><
sdo:datagraph xmlns:sdo="commonj.sdo"
xmlns:sdo_1="http://www.ibm.com/xmlns/prod/serviceregistry/6/0/sdo">
<changeSummary logging="true" xmlns=""/>
<sdo_1:WSRR>
<sdo_1:root>WSRR--c8e644f7.f101e566.614371e8.10def3f4b13.e2af041.2a</sd
o_1:root>
<sdo_1:artefacts xsi:type="sdo_1:WSDLDocument" bsrURI="WSRR-c8e644f7.f101e566.614371e8.10def3f4b13.e2af041.2a" description="Dan
Desc" lastModified="1159360105251" name="placeOrder"
namespace="http://www.WEBPROV.WEBPROVI.com" owner="wasadmin"
version="3"
content="
...
=" encoding="UTF-8" location="/u/username/wsdl/myservice1.wsdl">
<sdo_1:userDefinedProperties name="three" value="four"/>
<sdo_1:userDefinedProperties name="one" value="two"/>
<sdo_1:xsdTargetNamespaces>http://www.WEBPROV.WEBPROVI.Request.com</sdo
_1:xsdTargetNamespaces>
<sdo_1:xsdTargetNamespaces>http://www.WEBPROV.WEBPROVI.Response.com</sd
o_1:xsdTargetNamespaces>
</sdo_1:artefacts>
</sdo_1:WSRR>
</sdo:datagraph>
</p244:retrieveWithDepthResponse></soapenv:Body></soapenv:Envelope>]
Program 'DFHSR2WS' completed SUCCESSFULLY.
850
Symbolic parameters
The following symbolic parameters are defined in cataloged procedure
DFHSR2WS:
JAVADIR=path
Specifies the name of the Java directory that is used by DFHSR2WS. The
value of this parameter is appended to /usr/lpp/ giving a complete path name
of /usr/lpp/path
TMPDIR=tmpdir
Specifies the location of a directory in z/FS that DFHSR2WS uses as a
temporary work space. The user ID under which the job runs must have read
and write permission to this directory.
The default value is /tmp
TMPFILE=tmpprefix
Specifies a prefix that DFHSR2WS uses to construct the names of the
temporary workspace files.
The default value is SR2WS
WORKDIR=path
Specifies the location of the directory in z/FS in which the SupportPac was
installed. The user ID under which the job runs must have read permission to
this directory.
851
Important: DFHSR2WS does not lock access to the generated HFS file
names. Therefore, if two or more instances of DFHSR2WS run concurrently,
and use the same temporary workspace files, there is nothing to prevent one
job overwriting the workspace files while another job is using them. This can
lead to unpredictable failures.
Therefore, you are advised to devise a naming convention, and operating
procedures, to avoid this situation. For example, you can use the system
symbolic parameter SYSUID to generate workspace file names that are
unique to an individual user.
These temporary files are deleted before the end of the job.
.-CCSID=Cp037-.
>>-+-------------+--HOSTPORT=scheme://-+-domain name-+-:port number-->
'-CCSID=value-' '-IP address--'
>--+-------------------------------+--LOCATION=value--LOGFILE=value-->
'-KEYSTORE=value-+--------------+
'-KEYPWD=value-'
>--+-----------------------------------+----------------------------->
'-TRUSTSTORE=value-+----------------+
'-TRUSTPWD=value-'
>--+---------------------------------+--WSDLID=value----------------><
'-USERNAME=value-+----------------+
'-PASSWORD=value-'
Parameter use
You can specify the input parameters in any order.
Each parameter must start on a new line.
A parameter (and its continuation character, if you use one) must not extend
beyond column 72; columns 73 to 80 should contain blanks.
If a parameter is too long to fit on a single line, use an asterisk (*) character at
the end of the line to indicate that the parameter continues on the next line.
Everything (including spaces) before the asterisk is considered part of the
parameter.
For example:
852
LOCATION=/dir/*
placeOrder.wsdl
This is equivalent to:
LOCATION=/dir/placeOrder.wsdl
A parameter (and its continuation character, if you use one) must not extend
beyond column 72; columns 73 to 80 should contain blanks.
A # character in the first character position of the line is a comment character.
The line is ignored.
All keywords and values are case sensitive unless otherwise specified.
Parameter description
CCSID=Cp037|value
The character encoding used to write the WSDL file to z/FS. A list of
character encodings that can be specified is available in the Supported
Encodings topic in the Java manuals. For Java 1.4, the character encodings
are available from:
http://java.sun.com/j2se/1.4.2/docs/guide/intl/encoding.doc.html
HOSTPORT=scheme://{domain name|IP address}:port number
URI of the WSRR server. The scheme should be HTTP or HTTPS. The port
number defaults to 80.
KEYSTORE=value
Only required if the scheme specified in HOSTPORT is HTTPS. Fully
qualified filename of the Keystore file.
KEYPWD=value
The password to decrypt the keystore file.
LOCATION=value
Fully qualified filename for the WSDL document read from WSRR.
DFHSRWS creates the file (but not the directory structure) if it does not
already exist.
LOGFILE=value
The fully qualified filename into which DFHSR2WS writes its activity log and
trace information. DFHSR2WS creates the file (but not the directory structure)
if it does not already exist. Normally you will not need to use this file, but it
may be helpful to diagnose problems.
PASSWORD=value
853
Completion code
Table 17-2 shows the possible completion codes for DFHSR2WS.
Table 17-2 Completion codes for DFHSR2WS
Completion Code
Meaning
Input Error. The job did not complete successfully. One or more
error messages were issued to SYSOUT whilst validating the
input parameters.
Input Error. The job did not complete successfully. One or more
error messages were issued to SYSOUT whilst validating the
input parameters.
12
Error. The job did not complete successfully. One or more error
messages were issued to SYSOUT during execution.
17.7.1 Configuring SSL between the z/OS batch utilities and WSRR
The z/OS batch utilities require a key store and a trust store to be provided.
These can be created using a key configuration program such as ikeyman.
854
WebSphere Application Server which hosts WSRR provides some sample key
stores called DummyClientKeyFile.jks, DummyServerKeyFile.jks, and trust
stores called DummyClientTrustFile.jks and DummyServerTrustFile.jks. These
can be used as-is for testing the z/OS batch utilities with WSRR by specifying the
client key and trust files in the z/OS batch utilities and the server key and trust
files in WebSphere. As the keys in these stores are shipped with WebSphere,
they should be replaced.
As an example of using self-signed certificates, you could change the keys by
opening the client key file using ikeyman, delete the websphere dummy client
certificate and create a new self-signed certificate. Then extract the certificate
and add it into the server's trust file. Next, open the servers' key file, delete the
websphere dummy server certificate and create a new self-signed certificate,
then extract the certificate and add it into the client's trust file. The client and
server will then be able to use SSL with the new certificates.
855
856
Part 5
Part
Appendixes
857
858
Appendix A.
859
860
Rational Software Architect supports UML 2.0 for analysis and design using Use
Case, Class, Sequence, Activity, Composite Structure, State Machine,
Communication Component and Deployment diagrams. It supports UML class
diagram editing for Java, Enterprise Java Beans and Database objects. As well
as supporting full features of UML, it provides many additional capabilities.
Rational Software Architect is useful for turning the output of WebSphere
Modeler into service specifications and component-detailed designs that you can
then hand over to software developers for implementation.
Rational Software Architect has support for plugging in design patterns that help
automate development and promote re-use. It comes already populated with the
classic patterns described in Design Patterns: Elements of Reusable ObjectOriented Software by Erich Gamma, et al [GAMMA]. You can obtain other
predefined patterns or create your own to capture specific design practices that
you use commonly throughout your software.
More information about IBM Rational Software Architect can be found here:
http://www.ibm.com/software/awdtools/architect/swarchitect/features/
index.html
861
862
863
More information about IBM CICS Transaction Server V3.1, Web Services
Assistant can be found at this Web site:
http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/index.jsp
864
More information about IBM WebSphere Developer for zSeries V6 can be found
here:
http://www.ibm.com/software/awdtools/devzseries/
865
866
More detailed information about IBM WebSphere Application Server family can
be found at this Web site:
http://www.ibm.com/software/webservers/appserv/was/
More detailed information about IBM WebSphere Application Server Network
Deployment Edition can be found at this Web site:
http://www.ibm.com/software/webservers/appserv/was/network/
867
WebSphere Portal
IBM WebSphere Portal delivers a single point of personalized interactions with
applications, content, processes and people.
WebSphere Portal is a hosting environment for the user interaction logic of your
SOA application. More than that, the Portal server provides a platform on which
multiple service user interfaces can be aggregated on a single user page within a
layout template defined by the business. This provides for a unique combination
of structured layout and freedom for end users to customize the content they find
most important to getting their job done.
In addition, portlets rendered within the page layout can be configured with
published properties that when managed through the WebSphere Portals built-in
property broker can be used to create visual integration between the services
rendered by each of those Portlets. In effect, WebSphere Portal offers the
enterprise user the ability to form a customized visual composition of business
services.
WebSphere Portal is built on the J2EE and Web Services foundations provided
by WebSphere Application Server. WebSphere Portal enables rapid assembly of
application artefacts via the portlets.
More information about IBM WebSphere Portal can be found here:
http://www.ibm.com/software/genservers/portal/
868
869
870
871
More information about IBM Tivoli Access Manager can be found at this Web
site:
http://www.ibm.com/software/tivoli/products/access-mgr-e-bus/
872
More information about the IBM Tivoli Composite Application Manager family of
products can be found with the following resources:
IBM Tivoli Composite Application Manager products page:
http://www.ibm.com/software/tivoli/sw-atoz/indexC.html
IBM Redbook IBM Tivoli Composite Application Manager V6.0 Family:
Installation, Configuration, and Basic Usage, SG24-7151
873
ITCAM for CICS Transactions is not a standalone product. It needs either ITCAM
for Response Time Tracking, ITCAM for WebSphere, or both.
ITCAM for IMS Transactions is not a standalone product. It needs ITCAM for
Response Time Tracking, ITCAM for WebSphere, or both.
874
Candle/OMEGAMON Terminology
OMEGAMON Platform
CandleNET Portal
875
876
Candle/OMEGAMON Terminology
Data Warehouse
Appendix B.
Additional material
This redbook refers to additional material that can be downloaded from the
Internet as described here.
Description
Zipped integration scenario samples
877
200KB
Windows
878
Glossary
B
broker archive. A file that is the unit of deployment
to the broker that can contain any number of
compiled message flow and message set files and a
single deployment descriptor. A separate broker
archive file is required for each configuration that is
deployed.
Business Process Execution Language
(BPEL). An XML-based language for the formal
specification of business processes and business
interaction protocols. BPEL extends the Web
Services interaction model and enables it to support
business transactions.
C
Common Object Request Broker Architecture
(CORBA). An architecture and a specification for
distributed object-oriented computing that separates
client and server programs with a formal interface
definition. See also Internet Inter-ORB Protocol.
E
enterprise archive (EAR). A specialized type of
JAR file, defined by the J2EE standard, used to
deploy J2EE applications to J2EE application
servers. An EAR file contains EJB components, a
deployment descriptor, and Web archive (WAR) files
for individual Web applications. See also Web
archive, Java archive.
Enterprise JavaBeans (EJB). A component
architecture defined by Sun Microsystems for the
development and deployment of object-oriented,
distributed, enterprise-level applications.
I
Information Technology Infrastructure Library
(ITIL). A framework of best practice approaches
intended to facilitate the delivery and the
management of high quality information technology
(IT) services.
Internet Inter-ORB Protocol (IIOP). A protocol
used for communication between Common Object
Request Broker Architecture (CORBA) object
request brokers. See also Common Object Request
Broker Architecture.
879
J
J2EE Connector architecture (JCA). A standard
architecture for connecting the J2EE platform to
heterogeneous enterprise information systems
(EIS).
Java 2 Platform Enterprise Edition (J2EE). An
environment for developing and deploying
enterprise applications, defined by Sun
Microsystems Inc. The J2EE platform consists of a
set of services, application programming interfaces
(APIs), and protocols that provide the functionality
for developing multitiered, Web-based applications.
Java API for XML-based RPC (JAX-RPC). A
specification that describes application
programming interfaces (APIs) and conventions for
building Web services and Web service clients that
use remote procedure calls (RPC) and XML.
JAX-RPC is also known as JSR 101.
Java archive (JAR). A compressed file format for
storing all the resources that are required to install
and run a Java program in a single file. See also
enterprise archive, Web archive.
Java Authentication and Authorization Service
(JAAS). In J2EE technology, a standard API for
performing security-based operations. Through
JAAS, services can authenticate and authorize
users while enabling the applications to remain
independent from underlying technologies.
Java Management Extensions (JMX). A means
of doing management of and through Java
technology. JMX was developed through the Java
Community ProcessSM program, by Sun
Microsystems, Inc. and some leading companies in
the management field. JMX is a universal, open
extension of the Java programming language for
management that can be deployed across all
industries, wherever management is needed.
Java Message Service (JMS). An application
programming interface that provides Java language
functions for handling messages.
880
R
Remote Method Invocation (RMI). A protocol that
is used to communicate method invocations over a
network. Java Remote Method Invocation is a
distributed object model in which the methods of
remote objects written in the Java programming
language can be invoked from other Java virtual
machines, possibly on different hosts.
Remote Method Invocation over Internet
InterORB Protocol (RMI/IIOP). Part of the Java 2
Platform, Standard Edition (J2SE) model that
developers can use to program in the Java language
to work with RMI interfaces, but use IIOP as the
underlying transport.
remote procedure call (RPC). A protocol that
allows a program on a client computer to run a
program on a server.
S
Secure Sockets Layer (SSL). A security protocol
that provides communication privacy. With SSL,
client/server applications can communicate in a way
that is designed to prevent eavesdropping,
tampering, and message forgery.
U
Uniform Resource Identifier (URI). (1) A
compact string of characters for identifying an
abstract or physical resource.
(2) A unique address that is used to identify content
on the Web, such as a page of text, a video or sound
clip, a still or animated image, or a program. The
most common form of URI is the Web page address,
which is a particular form or subset of URI called a
Uniform Resource Locator (URL). A URI typically
describes how to access the resource, the computer
that contains the resource, and the name of the
resource (a file name) on the computer.
W
Web archive (WAR). A compressed file format,
defined by the J2EE standard, for storing all the
resources required to install and run a Web
application in a single file. See also enterprise
archive, Java archive.
Web Ontology Language (OWL). The Web
Ontology Language (OWL) is a W3C endorsed
format that can be used to define an ontology. It can
define relatively rich semantics including relations
between classes of entities (for example
disjointedness), cardinality (for example exactly
one), equality, properties, characteristics of
properties (for example symmetry), and enumerated
classes.
Web Services Description Language (WSDL).
(1) A set of definitions that consist of service, port,
message, bindings, and port type. WSDL provides a
way for service providers to describe the basic
format of Web service requests over different
protocols or encodings.
(2) An XML-based specification for describing
networked services as a set of endpoints operating
on messages containing either document-oriented
or procedure-oriented information.
Web Services Invocation Framework (WSIF). A
Java API that supports dynamic invoking of Web
services, regardless of the format in which the
service is implemented or the access mechanism.
Web Services Invocation Language (WSIL). An
XML document format that facilitates the discovery
of existing Web services and provides a set of rules
for how inspection-related information should be
made available for consumption.
Glossary
881
X
XML Path Language (XPath). An XSL
sublanguage designed to uniquely identify or
address parts of a source XML document, for use
with XSLT. XPath also provides basic facilities for
manipulation of strings, numbers and Booleans. See
Extensible Markup Language and Extensible
Stylesheet Language Transformation.
XML Schema Definition Language (XSD). A
language for describing XML files that contain XML
schema.
XML schema. An international standard that
defines a language for describing the structure of
XML documents. An XML schema formally
describes and constrains the content of XML
documents by indicating which elements are allowed
and in which combinations. (An XML Schema is an
alternative to a document type definition (DTD), and
can be used to extend functionality in the areas of
data typing, inheritance, and presentation.) The
XML Schema language is ideally suited to
describing the messages that flow between
business applications.
XML Services for the Enterprise (XSE). A
capability of WebSphere Developer which provides
tools that let you adapt COBOL-based applications
so that they can consume and produce XML
messages.
XML shredder. A function that parses an XML
document, extracting rows of data from an XML
table. Also referred to as parsing.
882
HTML
APAR
HTTP
API
IBM
BAR
Broker Archive
BPEL
IIOP
IRA
ISO
CCMDB
CICS
CLI
ISV
CMDB
ITCAM
COBOL
COE
Center of Excellence
CORBA
ITIL
CRUD
ITM
CSD
ITSO
DCA
DLA
J2C
DLFS
J2EE
DOS
JAAS
EAI
EAR
enterprise archive
JAR
Java archive
EBCDIC
EDI
JCL
EIF
JDBC
EIS
JDK
EJB
JES
ESB
JMS
ESQL
JMX
FTP
JNDI
GUI
JRE
high-level language
JSP
JavaServer Pages
HLL
883
JSR
SPI
JVM
SQL
LDAP
SSH
Secure Shell
MQ
SSL
MSS
SSO
Single Sign-on
OASIS
TCORE
TDW
ODBC
TEC
OTEA
TEMA
OWL
TEMS
RACF
TEP
RAD
TEPS
RAM
TSO
RDF
UDB
Universal Database
RFID
radio frequency ID
UDDI
RHAS
RMI
UI
User Interface
UML
URI
RPC
URL
RSA
VSAM
SACL
WAR
Web Archive
SAML
WESB
SCA
WID
SCDL
WMB
WMQ
WebSphere MQ
WPS
SDK
SDO
SHA
SLA
WSDL
SLES
WSIF
SMO
WSIL
SMTP
WSRR
SOA
service-oriented architecture
SOAP
XACML
SOR
statement of requirements
XML
884
XPath
XSE
XSL
XSLT
885
886
Related publications
The publications listed in this section are considered particularly suitable for a
more detailed discussion of the topics covered in this redbook.
IBM Redbooks
For information about ordering these publications, see How to get IBM
Redbooks on page 890. Note that some of the documents referenced here may
be available in softcopy only.
Patterns: SOA Foundation Service Creation Scenario, SG24-7240
Patterns: SOA Foundation Service Connectivity Scenario, SG24-7228
Patterns: Integrating Enterprise Service Buses in a Service-Oriented
Architecture, SG24-6773
Patterns: Implementing an SOA using an Enterprise Service Bus, SG24-6346
Getting Started with WebSphere Enterprise Service Bus V6, SG24-7212
Web Services Handbook for WebSphere Application Server 6.1, SG24-7257
Architecting Access to CICS within an SOA, SG24-5466
WebSphere Message Broker Basics, SG24-7137
IBM Tivoli Composite Application Manager V6.0 Family: Installation,
Configuration, and Basic Usage, SG24-7151
Best Practices for SOA Management, REDP-4233
Understanding SOA Security Design and Implementation, SG24-7310
Other publications
These publications are also relevant as further information sources:
Service-Oriented Architecture Compass: Business Value, Planning, and
Enterprise Roadmap, by Norbert Bieberstein, et al. IBM Press, 2005,
ISBN-10: 0131870025
887
888
WebSphere
WebSphere MQ Information Center
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp
WebSphere Application Server V6.0 Information Center
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp
CICS
Publishing a Web service to WebSphere Service Registry and Repository
from CICS Transaction Server V3.1
http://www.ibm.com/developerworks/websphere/library/techarticles/061
0_millwood/0610_millwood.html
CICS TS SupportPac CA1N - Support for the WebSphere Service Registry
and Repository
http://www.ibm.com/support/docview.wss?rs=1083&uid=swg24013629
CICS TS V3.1 Information Center
http://publib.boulder.ibm.com/infocenter/cicsts/v3r1/index.jsp
Service-oriented architecture
IBM SOA Foundation - An Architectural Introduction and Overview
http://download.boulder.ibm.com/ibmdl/pub/software/dw/webservices/ws
-soa-whitepaper.pdf
Introduction to SOA programming model
http://www.ibm.com/developerworks/webservices/library/ws-soa-progmod
el/
Introduction to SOA governance
http://www.ibm.com/developerworks/library/ar-servgov/
Related publications
889
890
Index
A
access control
administration 309311
overview 309
scripts for managing policy 322
type
create 309
delete 309
retrieve 309
transition 310
update 309
Access Services
SOA reference architecture model 13
action property 190
add properties to objects 440442
addChecksum 484485
adding permissions to roles 469
addPermissionToRole 197, 289, 322
addPermissionToRole2 289, 322
addPrincipalToRole 197, 288, 323
addRole 197, 288, 323
Admin (JMX) interface
overview 155
Admin MBean operations
addPermissionToRole 289
addPermissionToRole2 289
addPrincipalToRole 288
addRole 288
createOntologySystem 287288
deleteConfiguration 287
deleteOntologySystem 288
exportMetaData 288
getConfigurationId 287
getConfigurationIds 287
getPermissionsForRole 289
getRolesWithPermissions 288
importMetaData 288
loadConfiguration 287
persistPolicy 289
persistRoleMappings 289
removeAllRolePermissions 288
removeAllRoles 288
removePermissionFromRole 288
removePrincipalFromRole 288
removeRole 288
retrieveAllConfigurationNames 287
retrieveConfiguration 287
updateConfiguration 287
AdminException 285, 291292, 297
Administration 331
administrator permission 193
AL3 867
AllAuthenticatedUsers 187
application architecture 19
AppServer 660
Assemble
SOA lifecycle 8
attribute tables 681682
AttributeDeclaration 133, 135
auditing 77
authorization policy file 196
AuthorizeDevelopment 165
B
BaseObject 101103, 114
BindAddress 660
binding 22, 28, 55, 95, 514, 517
dynamic 22, 36
Java Message Service bindings 517
SCA binding 517, 535
static 22, 58
Web Service bindings 517
WebSphere Adapter bindings 518
WebSphere MQ bindings 518
WebSphere MQ JMS bindings 517
BM Tivoli Composite Application Manager for SOA
overview 641
BOOTSTRAPPORT 267268, 276278
Bowstreet Portlet Factory
overview 865
BrowseClassificationSystem 394
BSRSDOHelper 123
bsrURI 104, 128129, 141143, 168, 312, 801, 854
defined 104
temporary 141
Business Application Services
891
C
C 863
C++ 863
CA1N 826
calculateMD5Checksum 486
callout responses 519
Candle Data Warehouse 876
Candle Management Server 875
Candle Management Workstation 876
CandleNET Portal 875
CandleNET Portal Server 875
canonical data model 46
Change and Release Management 36
checkWSDLPorts 489490
CICS
overview 827831
SOA 831
Transaction Server 863
overview 827
TXSeries 829
Web Services Assistant 863
CICS SupportPac
downloading 832
installation 831834
overview 826
Class 861
classification functions 108
Classification Systems 330
classifications 8688
ontology 87
taxonomies 87
Web Ontology Language 87
within WSRR 87
ClassificationURI 387
classifiedByAllOf 192
892
classifiedByAnyOf 192
classifying objects 358363
browsing classifications 359
classifying an entity 361
loading an OWL file 358
removing a classification 361
client-side interception 651
CMDB
See Configuration Management Database
CMS
See Candle Management Server
collection 401410
definition file 151152
name, title, description 403
skeleton collection view 402
view areas 401
view buttons 407
view columns 404
column-definitions 407
com.ibm.ssl.keyStore 430
com.ibm.ssl.trustStore 430
command line
WebSphere Service Registry and Repository
administration 283
command line interface 74
import/export 315
overview 154
sample scripts 306
createGenericObject 306
createXMLDocument 306
deleteBaseObject 306
deleteConfig 307
export 306
findBaseObject 306
import 307
loadConfig 307
promote 307
retrieveConfig 307
transition 307
updateConfig 307
WebSphere Service Registry and Repository
administration 299307
Common Data Model 657658, 662
Common Object Repository 656, 659, 661, 664
common relationships 221
Communication Component 861
complex type 371
ComplexTypeDefinition 111, 133, 135
ComplexTypeDefinition relationships 242
component model 18
composite application
defined 20
composite state 159
Composite Structure 861
ComputerSystem 660
concepts 83, 370379, 385, 445451
classifying a complex type as a template 371
creating a concept from a template 374
creating concepts for objects 445447
creating concepts using local documents
448451
defining a concept template 371
deleting a concept 378
viewing templates 372
viewing the details of a concept 377
concrete types 111
configuration 283285, 411413
configuration document 283
configuration type 283
content 283, 411
managing 411413
name 283, 411
supported configurations 284
system indicator 284, 411
type 284, 411
Configuration Management Database 632, 696
ConfigurationType 285
ConnectorException 296297
content model
See information model
create method 204
createGenericObject script 306
createOntologySystem 287288, 307, 412
createRequest 142
createResponse 143
createXMLDocument script 306
creating content in WSRR 124
Custom Mediation 521
Customer Information Control System
See CICS
CWSP 842, 844
configuration file 844845
overview 826
running 843
D
Data Collector Adapter 648
Index
893
discovery 22
Discovery Library Adapter 648, 654, 659662,
702718
Business Process Execution Language for Web
Services 657
configuring 708713
delta books 656
Deployed 661
IBM Tivoli Composite Application Manager for
SOA 657
installing 705707
managed 661
overview 656657, 703
refresh books 656
using 714718
WebSphere Service Registry and Repository
657
DLA
See Discovery Library Adapter
document instance
creating 124128
document relationships 224
document types 8998
Service Component Architecture 9697
Service Component Description Language 89
Web Services Description Language 89, 9496
WS-Policy 89, 98
XML metadata 98
XML Schema Definition 89, 9193
downcast 110
dynamic binding 22, 36
dynamic programming model 100
E
Eclipse plug-in 73, 415451
See also Eclipse UI
installation 417427
Eclipse UI
See also Eclipse plug-in
416451
add properties to objects 440442
configuring 428431
creating concepts for objects 445447
creating concepts using local documents
448451
define relationships between objects 442445
import documents into local workspace
435438
894
F
Fail 521
Fail terminal 521
G
GenericObject 83, 123, 126128, 130, 135, 168,
191, 384385
creating 124
defined 81
getAllAttributeDeclarations 133
getAllBindings 133
getAllComplexTypeDefinitions 133
getAllElementDeclarations 133
getAllGenericObjects 135
getAllMessages 133
getAllOperations 133
getAllParts 133
getAllPolicyDocuments 133
getAllPorts 133
getAllPortTypes 133
getAllServices 133
getAllWSDLDocuments 133
getAllXMLDocuments 133
getAllXSDDocuments 133
getConfigurationId 287, 412
getConfigurationIds 287
getGovernanceConnection 304
getGovernanceRecord 135, 168
getInboundDependencies 220
getOntologyConnection 304
getOutboundDependencies 220
getPermissionsForRole 197, 289, 323
getPolicyConfiguration 323
getPolicyDocument 133
getProperties 305
getRoleMappingConfiguration 323
getRoles 323
getRolesWithPermissions 197, 288
getServiceRegistryRepositoryProxy 305
getSessionConnection 303
getUserDefinedRelationshipNames 135
getWSDLDocBindings 134
getWSDLDocMessages 134
getWSDLDocOperations 134
getWSDLDocParts 134
getWSDLDocPorts 134, 490
getWSDLDocPortTypes 134
getWSDLDocServices 134
getWSDLDocSOAPBindings 134
getWSDLDocSOAPPorts 134
getWSDLDocument 133
getWSDLPorts 135
getWSDLPortTypes 135
getWSDLServices 135
getXMLDocument 133
getXSDAttributeDeclarations 135
getXSDComplexTypeDefs 135
getXSDDocument 133
getXSDElements 134
getXSDSimpleTypeDefs 134
governance 4049, 5557, 6465, 7677,
157244, 461509
See also SOA governance
auditing 77
configuring 461509
governed collections 169179
adding an object 171
best practices 179187
removing an object 174
notification 76
removing governance 481
root object 168
service lifecycle 76
validation 76
Governance API 477
GovernanceManagePermission 194
governanceNotifiers 212
GovernanceRecord 135, 167187
attributes
entityBsrUri 167
governedObjects 167
state 167
GovernanceTransitionPermission 194
governanceValidators 208
governed collections 169179
adding an object 171
best practices 179187
removing an object 174
governed entity 158
governed object 158
GenericObject 168
lifecycle 159
making an object governable 477
PolicyDocument 168
removing governance 481
SCAModule 168
transitioning the lifecycle state 479
Index
895
WSDLDocument 168
XMLDocument 168
XSDDocument 168
GovernedCreatePermission 193
GovernedDeletePermission 194
governedObjects 167
GovernedRetrievePermission 193
GovernedRetrievePermissionA 195
GovernedRetrievePermissionB 195
GovernedUpdatePermission 194
GovernedUserUpdatePermission 195
GraphQuery 105, 130132, 191
defined 132
H
HIPAA 867
HL7 867
hub and spoke architecture 31
I
IBM Discovery Library Identity Markup Language
656
IBM IT Service Management 631
IBM Tivoli Access Manager
overview 871
IBM Tivoli Composite Application Manager
Candle product integration 875
overview 634
IBM Tivoli Composite Application Manager for CICS
Transactions 635
overview 874
IBM Tivoli Composite Application Manager for IMS
Transactions 635
overview 874
IBM Tivoli Composite Application Manager for Response Time Tracking 634, 638
overview 873
IBM Tivoli Composite Application Manager for SOA
166, 634, 638, 640653
components 647
integration scenarios with WebSphere Service
Registry and Repository 654
overview 870, 873
product features 644
situation 678690
overview 679
predefined 680
IBM Tivoli Composite Application Manager for SOA
896
Index
897
brary
J
Java API (EJB) 120135
creating content in WSRR 124
deleting content from WSRR 130
GraphQuery 132
Java client 120
PropertyQuery 132
querying content in WSRR 130
retrieving content from WSRR 128
ServiceRegistryClient 121
updating content in WSRR 129
Java client 120
Java Message Service bindings 517
JMSEndpoint 820
JMSExportBinding 110
JMSImportBinding 110
JMX
WebSphere Service Registry and Repository
administration 282, 292298
K
keyStore 430
L
lazy initialization 198
lifecycle 711, 158187
definitions 160
governed object 159
lifecycle flow 11
management with scripts 323
removing governance 481
SOA governance 158187
state machine 159
transitioning the lifecycle state 479
using 476482
WSRR default 163167
assemble 165
created 164
deploy 165
manage 166
model 164
retired 167
lifecycle ontology file 160163
generating 161
modifying 162
898
ListMyFavourites 394
ListMySubscriptions 394
LoadClassificationSystem 394
loadConfig script 307
loadConfiguration 287, 322, 412
LoadDocument 394
loading an OWL file 358
loadOntologySystem 322
loadPolicyConfiguration 323
loadRoleMappingConfiguration 323
locating WSRR MBean 286
logical derivations 82
defined 8182
parsing 8182
logical objects 82
defined 82
LogicalObject relationships 229
logicalobjects
from parsing 230
M
making an object governable 158, 477
Manage
SOA lifecycle 10
mapping users to roles 475
match policy 527, 530
MaxMessageSize_610 680
MaxResponseTimeCritical_610 681
MaxResponseTimeWarning_610 681
MBean 286
createOntologySystem 307
deleteOntologySystem 307
discovering WSRR MBean notifications 289
invoking MBean operations 289
ServiceRegistryRepository 282, 285286, 294,
412
supported Admin operations 197, 287
MBeanException 292, 296297
mediation 514515
mediation flow 518519
callout responses 519
request flow 518519
response flow 518519
mediation flow component 514, 518
mediation module 514, 516518
mediation primitives 520521
Custom Mediation 521
Database Lookup 520
N
name 190
navigation
definition file 150
navigation tree 390394, 397
NetView for z/OS 638
notification 76
NotificationProperties 207
notifiers 197, 203206
developing custom notifiers 486491
interfaces 203206
create method 204
delete method 205
transition method 205
update method 205
properties 211
O
object types
Export 384
ExportDocument 384
GenericObject 384
Import 384
ImportDocument 384
Module 384
ModuleDocument 384
PolicyDocument 384
SCAExportBinding 385
SCAImportBinding 384
SCAModule 384
SCAWSDLPortType 385
SLSBImportBinding 385
SOAPAddress 384
SOAPBinding 384
Subscription 385
WebServiceExportBinding 385
WebServiceImportBinding 385
WSDLBinding 384
WSDLDocument 384
WSDLMessage 384
WSDLOperaton 384
WSDLPart 384
WSDLPort 384
WSDLPortType 384
WSDLService 384
XMLDocument 384
XMLElement 384
XSDAttribute 384
XSDComplexType 384
XSDDocument 384
XSDSimpleType 384
ObjectType 383, 385
OMEGAMON Distributed 638
OMEGAMON for distributed products 875
OMEGAMON Monitoring Agent 875
OMEGAMON Platform 875
OMEGAMON TEC Event Adapter 688
OMEGAMON XE for WebSphere Business Integration 635
overview 874
OMEGAMON z/OS 638
ontology 87
administration 307309
creating an ontology system 308
defined 70
delete 322
Index
899
load 322
removing an ontology system 308
ontology Web service 138
operation 28
Operational Efficiency and Resilience 36
Oracle 869
OriginalObject 168171, 173174, 176177, 179,
185, 191, 199201, 204206
OriginalObject relationships 223
Out terminal 521
outbound dependencies 214
outputMBeanInterface 294295
OWL
See Web Ontology Language
P
parsing 67, 8182, 8485, 90, 93, 96, 168,
218219, 230
Partner Services
SOA reference architecture model 14
patterns
router pattern 806809
transcoder pattern 803806
permission 189195
action property 190
srrDelete 190
srrManageGov 190
srrRetrieve 190
srrTransition 190
srrUpdate 190
ssrCreate 190
adding permissions to roles 469
administrator permission 193
default permission 192
GenericObject 191
GovernanceManagePermission 194
GovernanceTransitionPermission 194
GovernedCreatePermission 193
GovernedDeletePermission 194
GovernedRetrievePermission 193
GovernedRetrievePermissionA 195
GovernedRetrievePermissionB 195
GovernedUpdatePermission 194
GovernedUserUpdatePermission 195
GraphQuery 191
name 190
OriginalObject 191
PolicyDocument 191
900
PropertyQuery 191
QueryObject 191
SCAModule 191
target property 191
user permission 195
WSDLDocument 191
XMLDocument 191
XSDDocument 191
persistPolicy 197, 289, 323
persistRoleMappings 197, 289, 323
perspective 394400
defined 394
definition file 147
mappings 398
name, title, role 396
navigation tree 397
skeleton perspective file 395
physical documents 81
defined 80
dependencies 500507
Service Component Description Language 81
Web Services Description Language 81
WS-Policy 81
XML Schema Definition 81
PL/I 863
plugins 197213
configuring 207213, 494499
deploying 491494
developing custom plugins 482499
notifiers 197, 203206
custom 486491
interfaces 203206
create method 204
delete method 205
transition method 205
update method 205
properties 211
packaging 206
validators 197203
chains 210
custom 483486
interfaces 199202
create method 200
delete method 201
transition method 201
update method 200
validate method 202
properties 207
PolicyDocument 133, 168, 191, 384
port 28
port type 28, 94
portType 126, 142
predicates 106
Process Services
SOA reference architecture model 12
programming model 9
promote script 307
properties 8485, 335346
add properties to objects 440442
adding a new custom property 336
deleting a custom property 344
editing a property 340
PropertyQuery 105, 130132, 191
defined 132
PropertyQueryResult 135, 140141
defined 141
protocol independence 34
publishing documents 331335, 438439
Q
query 103118, 330, 382390
See also searching the registry
classification functions 108
definition file 150
examples 105117
GraphQuery 105
limitations 118
predicates 106
PropertyQuery 105
querying by classification 387
querying by property 386
querying by relationship 386
relationship map 111
shortcuts and wildcards 107
treat as 110
using alternative views 385
view query 382390
query interface 72
QueryClassificationsAllOf 388
QueryClassificationsAnyOf 388
QueryDefinitions 383
QueryExactClassificationsAllOf 388
QueryExactClassificationsAnyOf 388
querying content in WSRR 130
QueryObject 123, 128, 191
creating 128
QueryWizardPrepare 394
R
RAD
See Rational Application Developer
Rational Application Developer 62
overview 862
Rational Data Architect
overview 861
Rational Software Architect 416417, 860
overview 860
Rational Software Developer Platform 864
Redbooks Web site 890
Contact us xxi
ReflectionException 296297
refresh books 656
relationship map 111
concrete types 111
supertypes 111, 114
XSD files 111, 116
relationships 8586, 347357
common 221
ComplexTypeDefinition 242
creating a new relationship 347
define relationships between objects 442445
deleting a relationship 357
document 224
editing an existing relationship 354
ElementDeclaration 241
LogicalObject 229
modelled 213, 218242
OriginalObject 223
SOAPAddress 241
SOAPBinding 237
user defined 213, 243244
WSDLBinding 235
WSDLDcoument 225
WSDLMessage 233
WSDLOperation 231
WSDLPart 234
WSDLPort 239
WSDLPortType 230
WSDLService 238
XSDDocument 227
Remote Method Invocation/InterORB Protocol
(RMI/IIOP) 866
remote procedure call 27
removeAllRolePermissions 197, 288, 323
Index
901
S
SACL
See State Adaptive Choreography Language
SAML 872
SCA
See Service Component Architecture
SCA bindings 517, 535
SCAExportBinding 111, 385
SCAImportBinding 110, 384
SCAModule 168, 191, 384
SCAWSDLPortType 111, 385
script
import and export of WSRR entities
902
exportMetaData 322
importMetaDataa 322
managing access control policy
addPermissionToRole 322
addPermissionToRole2 322
addPrincipalToRole 323
addRole 323
getPermissionsForRole 323
getPolicyConfiguration 323
getRoleMappingConfiguration 323
getRoles 323
loadPolicyConfiguration 323
loadRoleMappingConfiguration 323
persistPolicy 323
persistRoleMappings 323
removeAllRolePermissions 323
removeAllRoles 323
removePermissionFromRole 323
removePrincipalFromRole 323
removeRole 323
managing configuration
deleteConfiguration 322
loadConfiguration 322
reportAllConfigurations 322
updateConfiguration 322
managing lifecycles
setupDefaultLifecyclePermissions 323
updateLifecycleDefinition 323
managing ontologies
deleteOntologySystem 322
loadOntologySystem 322
sample command line interface 306
createGenericObject 306
createXMLDocument 306
deleteBaseObject 306
deleteConfig 307
export 306
findBaseObject 306
import 307
loadConfig 307
promote 307
retrieveConfig 307
transition 307
updateConfig 307
SDO
See Service Data Objects
sdo-int 136
sdo-int.jar 730
sdoType 406
classifications 8688
ontology 87
taxonomies 87
Web Ontology Language 87
within WSRR 87
defined 72, 80
properties 8485
relationships 8586
Service Details 669671
Service Development Lifecycle 36
Service Documents 330
service endpoint definitions 94
Service Endpoint Registries/Repositories 36
service interface definitions 94
service lifecycle 76
service message model 46
service message objects 514515, 519, 521525
manipulation 525
structure 522524
context section 524
data section 523
header section 524
Service Metadata 330
service migration 45
service monitoring 47
service orientation
defined 20
service ownership 47
Service Port Details 672674
service providers 21, 515
logical node 695
service registry 22, 46
in SOA governance 46
service registry and repository
See also WebSphere Service Registry and Repository
Change and Release Management 36
defined 1517
in a service-oriented architecture 1517, 3440
Operational Efficiency and Resilience 36
Runtime Integration 36
Service Development Lifecycle 36
Service Endpoint Registries/Repositories 36
Service Registry view 416417, 426427,
434435, 440, 442, 445, 447, 450
service security 48
service testing 48
service versioning 45
service-oriented architecture
Index
903
904
created 164
deploy 165
manage 166
model 164
retired 167
making an object governable 158
notification 76
root object 168
service definition 43
service deployment lifecycle 43
active 44
deprecate 44
plan 44
sunset 44
test 44
service lifecycle 76
service message model 46
service migration 45
service monitoring 47
service ownership 47
service registry 46
service security 48
service testing 48
service versioning 45
validation 76
SOA lifecycle 5, 711, 158187, 476482
See also lifecycle
Assemble 8
definitions 160
Deploy 9
lifecycle flow 11
Manage 10
Model 8
state machine 159
SOA management 3639, 626631
SOA reference architecture model 1118
Access Services 13
Business Application Services 13
Business Innovation and Optimization Services
17
Information Services 13
Infrastructure Services 18
Interaction Services 12
IT Service Management 17
Partner Services 14
Process Services 12
SOAP
See Simple Object Access Protocol
SOAP API 139144
bsrURI 141
DataGraphType 140
portType 142
PropertyQueryResult 141
WSRR type 140
SOAPAddress 384
SOAPAddress relationships 241
SOAPBinding 134, 384
SOAPBinding relationships 237
SOAPPort 134
SRDispatchVirtualService 790, 794, 820
SRGetVirtualService 790791
SRGovernanceValidator 209
SRProcessVirtualService 790, 793
SrrAuthCheckedPolicyXacml 196
SrrAuthzRoleMappingXacml 196
srrCreate 190, 193
srrDelete 190, 194
SRRetrieveEntity 791, 797
SRRetrieveITService 791, 795
srrManageGov 190, 194
srrRetrieve 190, 193
srrTransition 190, 194
srrUpdate 190, 194
SRTemplateValidator 209
SRXMLHelper 123124, 127
state 167
State Adaptive Choreography Language
defined 160
state machine 159, 861
static binding 22, 58
static programming model 100
Stop 521
Subscription 385
supertypes 111, 114
supported APIs 74
Swift 867
T
target property 191
taxonomies 87
TCORE
See Tivoli Common Object Repository
TDW
See Tivoli Data Warehouse
TEC
See Tivoli Enterprise Console
TEMA
Index
905
906
U
UDDI
See Universal Description, Discovery, and Integration
UML 2.0 861
Unified Service Metadata 329
Universal Description, Discovery, and Integration
defined 28, 65
update method 205
updateConfig script 307
updateConfiguration 207, 287, 322, 412
updateLifecycleDefinition 323
updating content in WSRR 129
upgrading
WebSphere Service Registry and Repository
279
URLEndpoint 820
Use Case 861
user defined relationships 213, 243244
user defined roles 188
user interfaces 73
Eclipse plug-in 73, 415451
Web interface 73
user permission 195
UserDefinedProperty 114
UserDefinedRelationship 114
V
validation 76
ValidationProperties 207
validators 197203
chains 210
developing custom validators 483486
interfaces 199202
create method 200
delete method 201
transition method 201
update method 200
validate method 202
properties 207
ViewDetail 405
VSAM 869
W
WASPORT 267268, 276278
Web interface 73
Web Ontology Language 16, 87, 307308, 322,
661
defined 70
loading an OWL file 358
Web Service bindings 517
Web Service Federation Language (WS-Federation) 872
Web services
and SOA 25
client 136
core elements
extensible markup language 26
Simple Object Access Protocol 27
SOAP 27
Universal Description, Discovery, and Integration 28
Web Services Description Language 27
XML 26
XML Schema Definition 27
installation 546
Web Services Description Language 532
Web services API 136144
EJB client 136
ontology Web service 138
Web services client 136
Web Services Description Language 16, 25, 58,
6768, 8081, 89, 91, 9496, 126, 179, 329331,
335, 516, 532, 657, 660
binding 28, 95
CICS 826
creating using Java API 125
defined 27, 54
import Web Services Description Language documents 500
message 27
operation 28
parsing 67, 82, 90, 96, 219, 230
port 28
port type 28, 94
publishing from CICS 842
publishing from z/OS 834
retrieve 435
retrieving from z/OS 847
searching for 417
service 28, 95
service binding definitions 94
service endpoint definitions 94
service interface definitions 94
types 27
versions 662
Web Services Inspection Language
defined 28
Web UI 144154, 327379, 381413
Administration 331
Classification Systems 330
classifying objects 358363
collection 151152, 401410
concepts 370379
See also concepts
concepts and architecture 144154
customizing 381413
definition files 146154
collection 151152
detail 152
hierarchy 147
navigation 150
perspective 147
query 150
deleting artefacts 369370
detail 152
layout 145147
My Service Registry 330
navigation 150
navigation tree 390394
perspective 147, 394400
properties 335346
publishing documents 331335
query 103118, 150, 330, 382390
quick search 329
relationships 347357
Index
907
908
supported transports
WebSphere Broker JMS Transport 775
WebSphere MQ Enterprise Transport 775
WebSphere MQ Mobile Transport 775
WebSphere MQ Multicast Transport 775
WebSphere MQ Real-time Transport 775
WebSphere MQ Telemetry Transport 775
WebSphere MQ Web Services Transport
775
WebSphere Message Broker V6 Client for WebSphere Service Registry and Repository 382,
771823
installation 780786
overview 786789
patterns 803823
router pattern 806809
setting up 809823
transcoder pattern 803806
prerequisites 779
WebSphere MQ bindings 518
WebSphere MQ Enterprise Transport 775
WebSphere MQ JMS bindings 517
WebSphere MQ Mobile Transport 775
WebSphere MQ Multicast Transport 775
WebSphere MQ Real-time Transport 775
WebSphere MQ Telemetry Transport 775
WebSphere MQ Web Services Transport 775
WebSphere Portal
overview 868
WebSphere Process Server
overview 868
WebSphere Service Registry and Repository
See also service registry and repository
administration
command line 283
command line interface 299307
JMX 282, 292298
wsadmin 282, 285292
wsadmin scripts 321323
authorization policy file 196
Change and Release Management 36
classifying objects 358363
concepts 370379
See also concepts
configuration 283285
See also configuration
supported configurations 284
content model
See information model
Index
909
removeRole 323
managing configuration
deleteConfiguration 322
loadConfiguration 322
reportAllConfigurations 322
updateConfiguration 322
managing lifecycles
setupDefaultLifecyclePermissions 323
updateLifecycleDefinition 323
managing ontologies
deleteOntologySystem 322
loadOntologySystem 322
setting up 285
troubleshooting WSRR administration 291
WebSphere Service Registry and Repository
administration 282, 285292
WebSphere Service Registry and Repository
administration scripts 321323
WS-BPEL
See Business Process Execution Language for
Web Services
WSDL
See Web Services Description Language
WSDL2Java 138
WSDLBinding 105, 133134, 384
WSDLBinding relationships 235
WSDLDocument 88, 104, 116, 126127, 133, 140,
168, 191, 384, 398, 487
WSDLDocument relationships 225
WSDLMessage 133134, 384
WSDLMessage relationships 233
WSDLOperation 133134, 384, 507
WSDLOperation relationships 231
WSDLPart 133, 384
WSDLPart relationships 234
WSDLPort 105, 133135, 140, 384, 486487
WSDLPort relationships 239
WSDLPortType 118, 126, 133135, 384
WSDLPortType relationships 230
WSDLService 105110, 116, 133135, 140,
383385, 398
WSDLService relationships 238
WSEndpoint 660
WSIL
See Web Services Inspection Language
WSOperation 660661
WS-Policy 81, 89, 98
WSPort 659, 661
WSPortType 661
910
X
XACML
See Extensible Access Control Markup Language
XML
See extensible markup language
XML metadata 98
XML Path Language
See XPath
XML Pointer Language 99
XML Schema Definition 16, 81, 89, 9193
defined 27, 54
import 126
include 126
parsing 67, 82, 85, 90, 93
redefine 126
XML Services for the Enterprise (XSE) 864
XMLDocument 133, 168, 191, 384
XMLElement 384
XPath 72, 99, 114
defined 99
XPointer
See XML Pointer Language
XSD
See XML Schema Definition
XSD files 111, 116
XSDAttribute 384
XSDComplexType 384
XSDDocument 133, 168, 191, 384
XSDDocument relationships 227
XSDSimpleType 384
XSLT
Index
911
912
(1.5 spine)
1.5<-> 1.998
789 <->1051 pages
Back cover
WebSphere Service
Registry and
Repository Handbook
Best practices
Sample integration
scenarios
SOA governance
SG24-7386-00
ISBN 0738489972
INTERNATIONAL
TECHNICAL
SUPPORT
ORGANIZATION
BUILDING TECHNICAL
INFORMATION BASED ON
PRACTICAL EXPERIENCE
IBM Redbooks are developed by
the IBM International Technical
Support Organization. Experts
from IBM, Customers and
Partners from around the world
create timely technical
information based on realistic
scenarios. Specific
recommendations are provided
to help you implement IT
solutions more effectively in
your environment.