WebSphere® Service Registry and Repository V6.2 (hereafter referred to as Registry) helps you achieve more business value from your service-oriented architecture (SOA) by enabling management and governance of your services. You can use Registry to store information about services that you already use, plan to use, or want to be aware of. These services can exist in your systems or in other organizations' systems. As the copy of record for service metadata, Registry establishes a central point for finding and managing service metadata acquired from a number of sources, including service application deployments and other service metadata and endpoint registries and repositories. This helps make the SOA deployment more dynamic and more adaptable to changing business conditions.
During the service development life cycle, Registry is used to store and capture the interfaces and messages used by a new service when it is modeled or a composite service or process when it is assembled. During development of a new service it is important to be able to search and find existing services. These existing services need to be registered so that they can be searched for, found, and reused.
The service discovery mechanism in Registry automatically discovers run time services from enterprise application environments and publishes the service descriptions to Registry. Service discovery allows you to point Registry at one or more enterprise systems and then automatically discover the service metadata from the enterprise applications contained in that system. You can query a system once, or configure the Registry to repeatedly query according to a schedule. Optionally, you can automatically place discovered services into a governance life cycle. You can specify the life cycle transition that a service undergoes 1) when the service is initially discovered, and 2) when the application in which the service was discovered is subsequently uninstalled.
This series uses a sample scenario to demonstrate discovery of Web services in four target environments. To set up the complete environment on Microsoft Windows® Server 2003, you need the following software:
- WebSphere Application Server V6.1 fix pack 17
- DB2® V9 (or other supported database). See Resources.
- WebSphere Service Registry and Repository V6.2
- WebSphere Process Server V6.1
- Microsoft .NET Framework V1.1 without security, or V2.0 or later with security
- Microsoft Internet Information Services (IIS) V5.0 or later
- Oracle Application Server Version 10.1.3.x
- The sample Web services applications for each of these environments
Alternatively, you can choose to set up just one or two of the target environments. Steps for enabling security are included, but the scenario can be run without security in non-production environments. We assume you are familiar with installation and configuration of the target systems, and with setting up Secure Sockets Layer (SSL) security.
How the service discovery mechanism works
The service discovery mechanism automatically searches a target enterprise environment for services and then loads the corresponding service description documents into Registry. In Registry V6.2, service discovery supports the following target enterprise system environments.
- IBM WebSphere Application Server run time
- All deployed J2EE standard Web services (JSR109 compliant) on WebSphere Application Server and Service Component Architecture (SCA) integration modules on WebSphere Enterprise Service Bus or WebSphere Process Server can be discovered and published.
- Microsoft® .NET Framework run time.
- All Microsoft .NET Framework-based Web services deployed on the .NET Framework can be discovered and published.
- Oracle® Application Server
- All deployed J2EE standard Web services (JSR109 compliant) on Oracle Application Server can be discovered and published.
The service discovery runs on top of the Registry scheduler framework and can be configured to run automatically at regular time intervals or run manually by using a script.
All discovered services are represented as a hierarchical object structure. This object structure is defined in a technical model using a Registry business model template. You can view the business model from the Configuration perspective in the Registry Web UI as shown in Figure 1. To view the model, select Active Configuration => Business Model Systems.
Figure 1. Technical business model
Each enterprise application in the target run time environment is represented by an EnterpriseApplication business model instance in Registry. The business model structure and its related support documents are shown in Figure 2.
Figure 2. Service discovery business model structure
Each EnterpriseApplication has the following attributes:
- Type: indicates the type of the enterprise application.
- Source: describes where the enterprise application originated, combining the configuration instance name and the enterprise application name.
- State: indicates the state of the enterprise application.
Each EnterpriseApplication also has a Modules relationship to one or more EnterpriseModules. Each EnterpriseModule represents a module of the enterprise application, for example a Web module in a J2EE application. The EnterpriseModule has the following relationships for representing discovered service definition documents.
- EnterpriseModule: WSDLDocuments
- The WSDL document(s) for this enterprise module (the published WSDL documents in Registry for the service description).
- EnterpriseModule: XSDDocuments
- The XSD document(s) for this enterprise module (the published XSD documents in Registry for the service description).
Figure 3 shows the mapping between the discovered services in Registry and the original enterprise applications in their target run time systems. Registry supports both simple and complex topologies.
Figure 3. Discovered service and enterprise application mapping
Set up and configure the service discovery environment
The service discovery feature is installed automatically when Registry is installed. It is disabled by default. To enable it, you need to configure the Registry scheduler and update the ServiceDiscoveryConfiguration XML file (covered in Part 2).
We use the fictional company JK Enterprises as an example to show how service discovery works. There are four different kinds of servers in JK Enterprises: WebSphere Application Server, WebSphere Process Server, Microsoft Internet Information Services (IIS), and Oracle Application Server (Figure 4). All have SSL security enabled, except Oracle Application Server. JK Enterprises wants to set up Registry to discover services from these four servers and store the metadata in Registry.
Figure 4. Service discovery topology
Set up machine 1: WebSphere Application Server
Install WebSphere Application Server V6.1 fix pack 17, then complete the instructions in the following sections to configure machine 1. Web services must be JSR109-compliant in order for them to be found by the service discovery mechanism.
Complete the following steps to configure WebSphere Application Server and enable SSL security.
- Use the Security Configuration Wizard in the WebSphere Application Server administrative console. Select Security => Secure administration, applications, and infrastructure => Security Configuration Wizard.
- Restart WebSphere Application Server. See Resources for more information on WebSphere security.
Figure 5. Configure SSL security for WebSphere Application Server
Install the sample Web services application
To illustrate the service discovery between Registry and WebSphere Application Server, we've created a sample Web services application. Download the SimpleWebService.ear and install it into WebSphere Application Server on machine 1 using the administrative console.
- Access the administrative console by typing
http://<my_host>:<my_port>/ibm/console. - Under Applications, select Install New Application, then
select SimpleWebService.ear and click Next as shown in
Figure 6.
Figure 6. Specify the application to install
- Click Next on the next three dialogs, leaving all default settings, then click Finish to complete the installation.
- On the next dialog, click Save to save it to the master
configuration, as shown in Figure 7.
Figure 7. Save the configuration
- Return to the application list by selecting Applications => Enterprise Applications, and start the application (select the checkbox next to the application and click Start). Figure 8 shows the sample Web services application installed.
Figure 8. Sample application installed in WebSphere Application Server
Set up machine 2: WebSphere Process Server
Install WebSphere Process Server V6.1. then complete the instructions in the following sections to configure machine 2.
Install the sample SCA integration module
To illustrate the integration between Registry and WebSphere Process Server, we've created a sample SCA application. Download the sample application SimpleSCAApp.ear and install it into WebSphere Process Server on machine 2 by doing the following:
- Access the administrative console by typing
http://<my_host>:<my_port>/ibm/console. - Under Applications, select Install New Application,
browse for and select the SimpleSCAApp.ear file, and click Next
as shown in Figure 9.
Figure 9. Specify the SCA module to install
- Click Next on the next three dialogs, leaving all default settings, then click Finish to complete the installation.
- On the next dialog, click Save to save it to the master
configuration, as shown in Figure 10.
Figure 10. Save the configuration
- Return to the application list by selecting Applications
=> Enterprise Applications, and start the application.
Figure 11 shows the sample SCA application installed.
Figure 11. Sample application installed in WebSphere Process Server
Set up machine 3: Microsoft IIS server
The setup of Microsoft .NET is slightly different from the setup of other environments. To discover services from Microsoft .NET, you must enable dynamic service discovery in your Microsoft .NET environment, known as DISCO. To begin, install Microsoft IIS then complete the instructions below to configure machine 3.
Configure Microsoft IIS server
- Open a command window and change the directory to <installation_drive >\WINDOWS\Microsoft.NET\Framework\<version >.
- Type
aspnet_regiis.exe -i. The console displays the messageStart installing ASP.NET. - When the process finishes, the console displays the message
Finished installing ASP.NET. - If you are using Microsoft Windows Server 2003, set the ASP.NET status
to
allowed. To do this, open the IIS Manager, choose the Web Service Extension folder and set the status of ASP.NET toallowed.
How dynamic discovery works in .NET
A .vsdisco file is a DISCO file that enables dynamic discovery of Web services. If a client computer requests an XML Web services dynamic discovery file (.vsdisco), the Microsoft .NET Framework analyzes the folder that contains the file and then generates an XML file as a response. The response file contains references to all Web services in that folder and in its subfolders.
Note on security: When dynamic discovery is enabled, all XML web services and discovery documents existing on the web server beneath the requested URL are discoverable. Therefore, care must be taken when enabling dynamic discovery, as it could unintentionally expose sensitive data, if the web server is not on a secure network with a firewall. For more information on security considerations when using .vsdisco files, see Resources.
To configure dynamic discovery, two steps are required:
- Adding a web.config file to the root directory of the Web site.
Listing 1 shows an example of the content of this file.
Listing 1. The web.config file<!-- web.config --> <configuration> <system.web> <httpHandlers> <add verb="*" path="*.vsdisco" type="System.Web.Services.Discovery.DiscoveryRequestHandler, System.Web.Services, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/> </httpHandlers> </system.web> </configuration>
- Adding a dynamic discovery file in any directory that contains Web services. Listing 2 shows an example of the content of this file.
Listing 2. The dynamic discovery file
<?xml version="1.0" encoding="utf-8" ?>
<dynamicDiscovery>
<add xmlns="urn:schemas-dynamicdiscovery:disco.2000-03-7"/>
</dynamicDiscovery>
|
A sample directory structure is illustrated in Figure 12. The left red rectangle highlights the virtual directory that contains the Web services. The right red rectangle highlights the web.config and the webservice.vsdisco files added to the directory.
Figure 12. Directory structure for IIS services
The physical structure of the virtual directory webserviceroot is illustrated in Figure 13. There are two dynamic discovery files in this structure: one is the webservice.vsdisco file in the root directory and the other is the innerservice.vsdisco file in the subdirectory innerinner.
Figure 13. The structure of the virtual directory webserviceroot
When a client requests the webservice.vsdisco file, an XML response is generated. Listing 3 displays the result. Note that the result contains three references to XML Web services and one reference to a dynamic discovery file.
The web services helloservice and helloworld are located in the root directory (webserviceroot). The Web service innerservice is located in the first-level subdirectory. These will be discovered.
However the Web services SecondInnerService — located in the second-level subfolder (innerinner) — and ThirdInnerService — located in third-level subfolder thirdinner — are not discovered directly. A reference to the dynamic discovery file innerservice.vsdisco is returned instead. Dynamic discovery works in the root folder and its subfolder. That is, it works to a depth of one subfolder. More .vsdisco files are required for a greater depth.
The responsibility of discovering these two Web services is passed to the innerservice.vsdisco file as shown in Listing 3.
Listing 3. The innerservice.vsdisco file
<?xml version="1.0" encoding="utf-8" ?>
<discovery>
<add xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.xmlsoap.org/disco/">
<contractRef>
<add ref="http://127.0.0.1/webservice/helloservice.asmx?wsdl"
docRef="http://127.0.0.1/webservice/helloservice.asmx"
xmlns="http://schemas.xmlsoap.org/disco/scl/"/>
<contractRef>
<add ref="http://127.0.0.1/webservice/helloworld.asmx?wsdl"
docRef="http://127.0.0.1/webservice/helloworld.asmx"
xmlns="http://schemas.xmlsoap.org/disco/scl/"/>
<contractRef>
<add ref="http://127.0.0.1/webservice/innerservice/innerservice.asmx?wsdl"
docRef="http://127.0.0.1/webservice/innerservice/innerservice.asmx"
xmlns="http://schemas.xmlsoap.org/disco/scl/"/>
<discoveryRef>
<add ref="http://127.0.0.1/webservice/innerservice/innerinner/
innerservice.vsdisco"/>
</discovery>
|
For the SSL security configuration, we use both server authentication and client authentication. Complete the following steps to configure IIS and enable SSL security.
- Right-click Default Web Site => Properties. On
the Directory Security tab, in the Secure Communications
section, click Server Certificate. Create a new certificate,
fill in the related material, and then save the certification to your
local disk. The server submits the certification request to the
Certificate Authority (CA). After the CA processes the request, you
are issued the certification.
Figure 14. Server authentication
- Access the CA host to view the status of a pending certificate request. Select the correct certification and save it to the local disk.
- Install the certification. Right-click Default Web Site
=> Properties. On the Directory Security tab, in
the Secure Communications section, click Server Certificate.
Select Process the pending request and install the certificate
and click Next. Select the certification and install it.
Figure 15. Install the certification
Right-click Default Web Site => Properties. On the Directory Security tab, in the Secure Communications section, click Edit. Select the Require secure channel (SSL) checkbox, and, in the Client certificates section, select Require client certificates.
Figure 16. Require client certificates
Install the sample Web services
To illustrate the service discovery between Registry and the IIS server, we've created a sample application. The sample contains a service called TestService. Download DotNetSampleApplications.zip and install it into the IIS server on machine 3 by doing the following:
- Create a new folder called webservice in the directory Inetpub.
- Copy the services into the folder and create a .vsdisco file as shown
in Figure 17.
Figure 17. Copy the Web services
- Right-click Default Web Site => New Web Site to create a virtual directory reference to the folder webservice.
- Start the IIS server to activate the service. See Figure 18.
Figure 18. Start the IIS server
Set up machine 4: Oracle Application Server
Install Oracle Application Server Version 10.1.3.x, then complete the instructions in the following sections to configure machine 4.
To illustrate the service discovery between Registry and Oracle Application Server, we've created a sample Web services application. Download the TestProjectEAR.ear file and install it into Oracle Application Server on machine 4.
Install the sample Oracle application
From the Oracle console:
- Click Home.
Figure 19. Oracle console
- Click Applications as shown in Figure 20.
Figure 20. Oracle console application perspective
- Click Deploy as shown in Figure 21.
Figure 21. Deploy Oracle application
- Select the archive location of TestProjectEAR.ear and click
Next as shown in Figure 22.
Figure 22. Select the Oracle application file
- Enter the application name and click Next as shown in Figure
23.
Figure 23. Enter the Oracle application name
- Click Deploy.
Figure 24. Deploy the Oracle application
- On the confirmation screen, click Return.
Figure 25. Save the configuration
- Make sure that the sample application TestProjectEAR.ear has been
successfully installed as shown in Figure 26.
Figure 26. The installed Oracle application
Set up machine 5: WebSphere Service Registry and Repository
Install the following software, then complete the instructions below to configure machine 5.
- Install WebSphere Application Server V6.1 fix pack 17.
- Install DB2 V9 (or another supported database)
- Install WebSphere Service Registry and Repository V6.2.
Because WebSphere Application Server and IIS are running with SSL security enabled, you must configure Registry in order to discover services from them. This can be implemented through the WebSphere Application Server dynamic outbound endpoint SSL configuration. You can use either the default SSL settings or create new ones.
If you want to use default SSL settings, add the public certificate of WebSphere Application Server to the default trust store as shown in Figure 27.
Figure 27. Use default SSL settings
Create new SSL configuration settings
If use are using IIS, we recommend that you use a separate dynamic outbound endpoint SSL configuration as shown in Figure 28.
Figure 28. Create new SSL settings
See Resources for more details on SSL configuration.
Configure Oracle for service discovery
Two Oracle JAR files are used during service discovery from Oracle Application Server: the adminclient.jar and oc4jclient.jar files. Obtain these files from the Administrative Client Utility at Oracle Application Server 10g Software Downloads. Then, follow the steps below to configure Oracle for discovery.
- From the WebSphere administrative console, select Environment => Shared Libraries and click New to add a new shared library.
- Enter the name and classpath and click OK.
Figure 29. Shared libraries perspective
Figure 30. Create shared libraries
- Map the two Oracle JAR files to the ServiceRegistry application as shown in Figures 31 and 32. Select Enterprise Applications => ServiceRegistry => Shared library references. Then move the libraries from the Available list to the Selected list.
Figure 31. Shared library references
Figure 32. Map shared libraries to the application
This series demonstrates the advanced features of service discovery in WebSphere Services Registry and Repository V6.2. Part 1 describes the setup needed for 4 different target environments and includes sample Web services applications. In Part 2 you learn how to discover services automatically and manually in WebSphere Application Server, WebSphere Process Server, Microsoft .NET, and Oracle Application Server.
| Description | Name | Size | Download method |
|---|---|---|---|
| Sample applications for WebSphere and Oracle | SampleJ2EEApplications.zip | 89KB | HTTP |
| Sample application for Microsoft .NET | SampleDotNetApplications.zip | 6KB | HTTP |
Information about download methods
- Find details on SSL configuration in the
WebSphere Application Server Information Center.
- Learn more about WebSphere Process Server
in the
WebSphere Process Server V6.1 Information Center.
- Consult the WebSphere Service Registry
and Repository V6.2 Information Center for
details on service discovery
and
database
requirements for Registry.
- Browse
Microsoft IIS
information.
Find details on
using SSL to
secure Web Services on IIS.
Read more about
securing ASP.NET Web
Services.
- Browse the
Oracle Technology Network
for information on Oracle Application Server V10.1.3.x .

Xiao Qiang Hou is a Staff Software Engineer at IBM in the China Development Lab. He has many years of experience with IBM WebSphere Business Integration products and is currently focused on design and development of the WebSphere Service Registry and Repository. You can reach him at houxq@cn.ibm.com.
Bing Bing Du is a software engineer at IBM, in the SOA Design Center, China Development Lab. You can reach her at dubb@cn.ibm.com.

Yi San (Sam) Zhao joined IBM in January 2003 and worked as developer and tester for Lotus. He is the development lead for WebSphere Service Registry and Repository. You can reach him at zhaoyis@cn.ibm.com.

Bernard Kufluk is an IBM software developer working on WebSphere Service Registry and Repository. He has been engaged in the API development team since November 2005. Over the past seven years, he has worked on various IBM products including WebSphere Voice Application Access, WebSphere Voice Response, and Intelligent Notification Services. You can reach him at bernard@uk.ibm.com.




