Skip to main content

skip to main content

developerWorks  >  WebSphere | SOA and Web services  >

Integrate metadata between WebSphere Service Registry and Repository and WebSphere Business Services Fabric

developerWorks
Document options

Document options requiring JavaScript are not displayed


My developerWorks needs you!

Connect to your technical community


Rate this page

Help us improve this content


Level: Intermediate

Rishi S. Balaji (ribalaji@in.ibm.com), Associate Architect, IBM
Balraj D. Goulikar (bgoulika@in.ibm.com), Technical Lead, IBM

29 Aug 2007

This article shows you how to source service metadata from WebSphere® Service Registry and Repository into WebSphere Business Services Fabric, including how to configure Business Services Fabric to enable replication of service metadata between the two products and how to use the sourced data in Business Services Fabric to assemble composite business services.

Introduction

WebSphere Business Services Fabric (hereafter called Business Services Fabric) and the WebSphere Service Registry and Repository (hereafter called Service Registry and Repository) are part of an IBM SOA solution and play an important role in developing SOA-based applications. Business Services Fabric provides an end-to-end platform for the rapid assembly, delivery and governance of industry-focused composite business services (hereafter called CBS), while Registry and Repository stores, accesses, and manages technical information about services and service endpoint descriptions in a SOA.

The business services repository (hereafter called the BSR) of Business Services Fabric contains business-related metadata and industry semantic models for use in dynamic service selection and assembly. The BSR includes business-related policies, semantics, metadata, and subscriptions. Business Services Fabric leverages and extends the Service Registry and Repository to source technical service metadata information and provide business context through the use of BSR.

Once the service metadata in Service Registry and Repository is replicated into the BSR, composite business services, which are typically built on the Business Services Fabric Industry Content Packs and the Business Services Foundation Pack, have access to them. Composite business services can then define policies, or business context, and assertions on the services with endpoint metadata retrieved from Service Registry and Repository. These policies and assertions can be used by composite business services to perform dynamic endpoint selection based on the content, context and contract associated with every service invocation. Figure 1 illustrates how the two products fit together in a typical CBS implementation:


Figure 1. Integration between Business Services Fabric and Service Registry and Repository
Figure 1. Integration between Business Services Fabric and Service Registry and Repository

In the absence of such an integration feature, organizations would need to spend resources to manually catalog the data in the Service Registry and Repository into the BSR. Further, updates to this service metadata would have to be performed manually in both repositories. With the integration in place, a few configuration steps in Business Services Fabric are all that's needecd to automate this otherwise manual process. This, of course, speeds up CBS development.

When Business Services Fabric is configured to replicate data from Service Registry and Repository into the BSR, it queries the Service Registry and Repository for service endpoints, interfaces and operations. The first time Business Services Fabric connects to Service Registry and Repository, it retrieves all the service metadata from the WSDL files and catalogs it in the BSR. On subsequent connections, it retrieves any updates that have been made to the services in the Service Registry and Repository since the previous connection. When a WSDL file is deleted from Service Registry and Repository, the service metadata is not deleted from the BSR. The reason for this behavior is to avoid invalidating the assertions that have been defined on the deleted endpoints. Any data in the BSR that is a replicated instance from Service Registry and Repository will, when deleted from the BSR (and not from Service Registry and Repository), be restored from Service Registry and Repository when Business Services Fabric connects to the Service Registry and Repository the next time.

This article shows how to configure Business Services Fabric to enable replication of service metadata from Service Registry and Repository. It then shows you how to use this service metadata to assemble a CBS.

The instructions provided in this article apply to the following product versions:

  • WebSphere Business Services Fabric V6.0.2 (Foundation Pack and Tool Pack)
  • WebSphere Service Registry and Repository V6.0.0
  • WebSphere Process Server V6.0.2
  • WebSphere Integration Developer V6.0.2


Back to top


Configure Business Services Fabric for Service Registry and Repository replication

Complete the steps in this section to configure Business Services Fabric for Service Registry and Repository integration.

Create an organization

First create an organization in Business Services Fabric.

  1. Browse to http://<process_server_location>:<port number>/fabric/app, where <process_server_location>:<port number> is the location and port number of the Process Server hosting Business Services Fabric.
  2. Log on to Business Services Fabric using the user ID admin and the password webify, as shown in FIgure 2.

    Figure 2. Log on to Business Services Fabric
    Figure 2. Log on to Business Services Fabric

  3. Select My Services => Subscriber Manager => Manage Subscribers to open the Manage Subscribers page, as shown in Figure 3.
  4. Click Create an Organization.

    Figure 3. Manage subscribers
    Figure 3. Manage subscribers

  5. Fill in your organization details and click Create Organization, as shown in Figure 4.

    Figure 4. Create an organization
    Figure 4. Create an organization

Create an external Service Registry and Repository project

You need to create a Business Services Fabric project of type External WSRR to hold the data that will be replicated from Service Registry and Repository. To create this project, do the following:

  1. Select Governance Manager => Configure Projects to open the Configure Projects page, as shown in Figure 5.
  2. Click Create a Project.

    Figure 5. Configure projects
    Figure 5. Configure projects

  3. Specify the following on the Project Details tab, as shown in Figure 6:
    • Project Name: Specify a name for the project.
    • Description: Specify a meaningful description for the project.
    • Project Type: Select External WSRR.
    • Source Name: Specify a unique name that identifies your Service Registry and Repository location; for example, http://ibm.com/wsrr/sponsored/gbsc.
    • Sponsored NS URI: Specifiy the URI of the namespace that contains the metadata that has been retrieved from Service Registry and Repository.
    • Team Organization: Select your organization.
    • Click Create Project.


    Figure 6. Specify project information
    Figure 6. Specify project information

  4. Click the Namespaces tab.
  5. Select Fabric Services from the Project list, as shown in Figure 7:

    Figure 7. Select Fabric Services
    Figure 7. Select Fabric Services

  6. Check all the namespaces displayed and clickImport Namespaces, as shown in Figure 8:

    Figure 8. Import all the namespaces in the Fabric Business Service Model Project
    Figure 8. Import all the namespaces in the Fabric Business Service Model Project

  7. Click the Federation Settings tab and specify the following, as shown in Figure 9:
    • Specify the Hostname and Port where Service Registry and Repository is located.
    • If Service Registry and Repository is running on a secure server, select True for Requires Security and provide the User ID and Password for authenticating to Service Registry and Repository.
    • For Data Expiration select how you want Business Services Fabric to expire Service Registry and Repository data in the BSR. In this case, select Time to Live. This means that Business Services Fabric uses a specific time interval before connecting to Service Registry and Repository to check for updates to the service metadata. The other option is to select Time of the Day to choose a specific time when Business Services Fabric connects to Service Registry and Repository.
    • Select a value for Time to Live.

      When users log in to Business Services Fabric, Business Services Fabric determines whether to connect to Service Registry and Repository based on the Time to Live value that has been set for the Service Registry and Repository project. The Time to Live value determines the window of time that should expire before Business Services Fabric attempts to connect to Service Registry and Repository. This means that if the user logs on multiple times before the Time to Live expires, Business Services Fabric connects to Service Registry and Repository only at the first log in.

    • The External Settings are already generated for you.


    Figure 9. Specify federation settings
    Figure 9. Specify federation settings

  8. Click Test Connection and make sure the test is successful.
  9. Click Save to save the project to the BSR.

Create a business service project for the CBS

In the last section, you created a project to hold the data retrieved from Service Registry and Repository. Now you need to create a Business Services Fabric project of type Business Service to hold the service metadata contents for your CBS. In this step you'll see how a CBS can use Service Registry and Repository service metadata replicated into the BSR.

  1. Select Governance Manager => Configure Projects.
  2. ClickCreate a Project.
  3. Specify the following, as shown in Figure 10:
    • Project Name: Specify a name for the project
    • Project Type: Select Business Service.
    • Team Organization: Select your organization.
    • Description: Specify a meaningful description for the project.
    • Click Create Project.


    Figure 10. Create a Business Service project for the CBS
    Figure 10. Create a Business Service project for the CBS

  4. Click the Namespaces tab and import the following namespaces into this project:
    • Fabric Services
    • The sponsored namespace that was created for the External WSRR project in the previous section. This makes the contents retrieved from Service Registry and Repository available to the CBS.
  5. Create a namespace to hold the contents of your Business Service project by doing the following:
    1. Select Governance Manager => Configure Namespaces.
    2. Specify the following, as shown in Figure 11:
      • Display name: Specify a name for this namespace.
      • Namespace type: Select Instance.
      • Namespace URI: Specify the URI of the namespace for your CBS metadata contents.
      • Owner Project: Select the CBS project that was created in Step 3.
      • Description: Enter a meaningful description for this namespace.
      • Click Create Namespace.


      Figure 11. Create a namespace to hold the Business Service project metadata
      Figure 11. Create a namespace to hold the Business Service project metadata

You've now completed the necessary steps to configure Business Services Fabric for Service Registry and Repository integration.



Back to top


Verify and Troubleshoot Service Registry and Repository Replication

In this section, you'll learn how to to verify the replication of data between the repositories and how to troubleshoot replication problems.

Configure log levels in WebSphere Process Server

While replicating data from Service Registry and Repository to the BSR, Business Services Fabric logs information about the status of replication in the traceout.log file. You need to configure the following Process Server logs to view the log statements from Business Services Fabric:

  • com.webify.fabric.wsrr.WsrrFederatedSource
  • com.webify.fabric.wsrr.facade.WsrrReplicator
  • com.webify.fabric.wsrr.facade.EndpointValidator

You can enable these logs from the Process Server administrative console by doing the following:

  1. Select Troubleshooting => Logs and Trace => Change Log Level Details.
  2. In the text area, append the following text:
    com.webify.fabric.wsrr.WsrrFederatedSource=all:
    com.webify.fabric.wsrr.facade.WsrrReplicator=all:
    com.webify.fabric.wsrr.facade.EndpointValidator=all
    			

Enabling these logs generates the following information in the log file. The lines below show the server location, when the Time to Live value expires and the number of endpoints that will be replicated.

WsrrFederated 1 com.webify.fabric.wsrr.WsrrFederatedSource
signalReplicate Replicate signaled for
WsrrFederatedSource(WsrrConfig(9.182.48.38/8080/null/null))

[6/26/07 13:29:07:859 IST] 00000047 WsrrFederated 1
com.webify.fabric.wsrr.WsrrFederatedSource replicateIfNeeded
replicateIfNeeded(), now = 1182844747734

[6/26/07 13:29:07:859 IST] 00000047 WsrrFederated 1
com.webify.fabric.wsrr.WsrrFederatedSource replicateIfNeeded
replicateIfNeeded(), _lastExpirationTime = 0

[6/26/07 13:29:07:859 IST] 00000047 WsrrFederated 1
com.webify.fabric.wsrr.WsrrFederatedSource replicateIfNeeded
replicateIfNeeded(), nextExpiration = 1182844740000

[6/26/07 13:29:07:859 IST] 00000047 WsrrFederated 1
com.webify.fabric.wsrr.WsrrFederatedSource internalReplicate
Decided to internalReplicate() for 
WsrrFederatedSource(WsrrConfig(9.182.48.38/8080/null/null))

[6/26/07 13:29:11:766 IST] 00000047 WsrrReplicato 1
com.webify.fabric.wsrr.facade.WsrrReplicator replicate Will
replicate 4 endpoints.

The following lines show the details of the specific endpoints that are being replicated:

[6/26/07 13:29:11:781 IST] 00000047 WsrrReplicato 1
com.webify.fabric.wsrr.facade.WsrrReplicator
enqueueReplicateSingleEndpoint 
Replicating one endpoint: WsrrEndpoint
TransformEDI837Endpoint,port=http://healthcare.ibm.com/claims/edi/
transformEDI#TransformEDI837Endpoint) (http://healthcare.ibm.com/claims/edi/transformEDI#
TransformEDI837Endpoint%29) 

[6/26/07 13:29:11:812 IST] 00000047 WsrrReplicato 1
com.webify.fabric.wsrr.facade.WsrrReplicator
enqueueReplicateSingleEndpoint 
Replicating one endpoint : WssrrEndpoint
TransformEDI835Endpoint,port=http://healthcare.ibm.com/claims/edi
/transformEDI#TransformEDI835Endpoint)
(http://healthcare.ibm.com/claims/edi/transformEDI#TransformEDI835Endpoint%29) 


[6/26/07 13:29:11:812 IST] 00000047 WsrrReplicato 1
com.webify.fabric.wsrr.facade.WsrrReplicator
enqueueReplicateSingleEndpoint 
Replicating one endpoint : WsrrEndpoint
(ValidateEDI835Endpoint,port=http://healthcare.ibm.com/claims/edi
/validateEDI#ValidateEDI835Endpoint)
(http://healthcare.ibm.com/claims/edi/validateEDI#ValidateEDI835Endpoint%29) 

Validate WSDL files in Service Registry and Repository

Web Services Interoperability (WS-I) is an open industry organization chartered to promote Web services interoperability across platforms, operating systems and programming languages. Business Services Fabric validates the contents of the WSDLs based on WS-I standards before it replicates the data into the BSR. Specifically, it performs the following validations on the WSDL file:

  1. Endpoint fields must have a display name (port name), address (per port soap address), and support service (per portType).
  2. Addresses must have a valid HTTP URL.
  3. A Web service display name (portType name) must be specified.
  4. Service operations must have input and output messages (wsdlInput/wsdlOutputMessage).

If a single endpoint fails the validation it does not stop other valid endpoints from successfully replicating.

You need to make sure all WSDL files in Service Registry and Repository contain enough information to pass these validation tests. By making all the WSDLs in the WebSphere Repository compliant with WS-I standards, you can ensure that they pass the Business Services Fabric validation check.

Before attempting to debug replication issues, make sure you've followed the instructions in Configure Business Services Fabric for Service Registry and Repository replication. Specifically, check that the federation settings in the External WSRR project are valid. Use the Test connection function to make sure Business Services Fabric is able to connect to Service Registry and Repository. When the user logs in, Business Services Fabric attempts replication based on the Time to Live value configured for the External WSRR project. If you don't see replication happending, make sure you're logged in.

Use the metadata sourced from Service Registry and Repository

After making sure that Business Services Fabric has been successfully configured to replicate service metadata from the Service Registry and Repository, you can now use the data to assemble your CBS. Composite business services are assembled using the Composition Studio, an Eclipse plug-in that is shipped with Business Services Tool Pack and installed as a plug-in to WebSphere Integration Developer (hereafter called Integration Developer). Using the metadata from Service Registry and Repository in your CBS involves a two-stage process:

  1. First, you need to replicated the External WSRR project you created into the Composition Studio. Then you can view the services and endpoints that were retrieved from Service Registry and Repository in the Composition Studio, and define assertions for these endpoints.
  2. Second, you need to replicate the Business Service project you created into the Composition Studio. In this project, you can define policies and assign them to the services retrieved from Service Registry and Repository.

Replicate External WSRR project

  1. In Integration Developer, select Window => Preferences => Business Services Fabric => Catalog Configuration.
  2. Specify the following information in the Configuration dialog:
    • The Hostname and Port Number of the Process Server instance where Business Services Fabric is installed.
    • The User ID and Password to use to connect to Business Services Fabric.

    Composition Studio uses this information while connecting to Business Services Fabric.

  3. Switch to the Business Service perspective in Integration Developer.
  4. Right-click Business Service Explorer and select New => Fabric Project, as shown in Figure 12.

    Figure 12. Create new Fabric project in Composition Studio
    Figure 12. Create new Fabric project in Composition Studio

  5. In the resulting dialog, specify a project name for the External WSRR project in Business Services Fabric and click Next.
  6. Click Update Project to replicate the BSR into the local workspace in Integration Developer.
  7. Wait for the wizard to complete the replication and click Next, as shown in Figure 13.

    Figure 13. Replicate data from BSR into the workspace
    Figure 13. Replicate data from BSR into the workspace

  8. Select the External WSRR project you created earlier as the Fabric Project, and click Finish, as shown in Figure 14.

    Figure 14. Select the External WSRR project
    Figure 14. Select the External WSRR project

You should be able to see the endpoints from Service Registry and Repository in Composition Studio.

You now have access to the endpoints from Service Registry and Repository replicated into the BSR. You can now define assertions on these endpoints. The steps involved in creating assertions are beyond the scope of this article.

Replicate the Business Service project

The Business Service project you created earlier holds the metadata specific to your CBS. You need to replicate this project into Composition Studio. The steps involved in replicating this project are similar to those described in the previous section for replicating the External WSRR project, with the following changes:

  • Change the project name to one appropriate for your Business Service project in Business Services Fabric.
  • Select the Business Service project for your CBS in Step 8, as shown in Figure 15.

Figure 15. Select the Business Service project
Figure 15. Select the Business Service project

After replicating the Business Service project into Composition Studio, you have access to the endpoints from the Service Registry and Repository in your CBS. You can now define policies on these endpoints and test them similar to how you would deal with endpoints from sources other than Service Registry and Repository. The steps involved in creating policies and testing them in Composition Studio is beyond the scope of this article.

Figure 16 shows both the External WSRR project and the Business Service project replicated into the local workspace in Integration Developer. The endpoints replicated from Registry and Repository are circled in both projects.


Figure 16. View the service metadata from Service Registry and Repository in Composition Studio
Figure 16. View the service metadata from Service Registry and Repository in Composition Studio


Back to top


Conclusion

This article described the importance of integrating Business Services Fabric with Service Registry and Repository in an SOA implementation. It showed you how to configure Business Services Fabric to retrieve service metadata from Service Registry and Repository and how to use this data in assembling composite business services. CBS developers can use this article as a reference when integrating Business Services Fabric instances with Service Registry and Repository during CBS assembly.



Resources



About the authors

Rishi Balaji photo

Rishi S. Balaji is an Associate Architect at the Global Business Solutions Center in IBM India. His expertise is in design and development of J2EE applications and reusable assets for service-oriented architectures.You can reach Rishi at ribalaji@in.ibm.com.


Balraj Goulikar photo

Balraj D. Goulikar is the technical lead at the Global Business Solutions Center in IBM India. He has been involved with SOA asset development using Websphere Business Services Fabric for the last year. He has six years of experience in developing enterprise solutions using open source technologies such as Spring, Hibernate, OJB, and XML beans. You can reach Balraj at bgoulika@in.ibm.com.




Rate this page


Please take a moment to complete this form to help us better serve you.



 


 


Not
useful
Extremely
useful
 


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!



Back to top