Header Image

Integration with IBM WSRR

WSRR is IBM's registry / repository product for design time SOA governance. Similar products like HP’s Systinet or Software AG’s CentraSite are built upon the UDDI standard for systems to interface with a service registry. The Layer 7 SOA Gateway already has existing bi-directional support for registries that expose a UDDI v3 API.

This tutorial describes how the Layer 7 SOA Gateway Appliance can be configured to query WSRR for published WSDL's, and subsequently deploy them onto the device seamlessly. This example uses the Gateway's rich policy language with built-in support for Web Services Inspection Language (WSIL) to "discover" services from WSRR.


What is WSIL?
WSIL is a standard format for document discovery (WSDL) developed jointly by Microsoft and IBM. It provides a way to describe in XML, a group of web services with associated endpoints.


WSRR exposes a proprietary REST API that can be used to query the repository for artifacts. In this case, the Layer 7 SOA Gateway can leverage this API to provide a WSIL interface backed by a WSRR registry. With this capability, users can now publish SOAP services onto the Layer 7 Gateway device in three ways:

  • Enter the URL for the WSDL found on the local file system or hosted remotely
  • Browse for a WSDL published in a UDDI version 3 registry (i.e., Systinet or CentraSite)
  • Browse for a WSDL using the WSIL dialog backed by WSRR

Step 1. In the Policy Manager, create a new Layer 7 Policy that will act as the WSIL service for a WSRR repository REST API call.

Create an XML application in SecureSpan Policy Manager. Integration with IBM WSRR Tutorial - Layer 7 Technologies

Fig 1. Create an XML Application

Fill in the fields of the wizard appropriately for your environment and click Finish. The following is asample policy that you can build using the Gateway’s existing palette of assertions:

Sample WSRR-to-WSIL query policy. Integration with IBM WSRR Tutorial - Layer 7 Technologies

Figure 2. Sample WSRR-to-WSIL query policy


For Line 11 (the XSL Transformation), you can include the following stylesheet:

<xsl:stylesheet version="1.0" xmlns:wsil="http://schemas.xmlsoap.org/ws/2001/10/inspection/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:output indent="no" method="xml" omit-xml-declaration="yes"/>


    <xsl:param name="wsrr-queryBaseUrl"/>

    <xsl:param name="wsdlUrlPrefix"><xsl:value-of select="$wsrr-queryBaseUrl"/>/Content/</xsl:param>

    <xsl:param name="wsdlReferencedNs">http://schemas.xmlsoap.org/wsdl/</xsl:param>


    <xsl:template match="resources">

        <xsl:element name="inspection" namespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/">

            <xsl:call-template name="CreateAbstract">

                <xsl:with-param name="value">WSRR WSDL Registry</xsl:with-param>


            <xsl:apply-templates select="resource[@type='WSDLDocument']"/>




    <xsl:template match="resource">

        <xsl:element name="service" namespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/">

            <xsl:call-template name="CreateAbstract">

                <!-- <xsl:with-param name="value"><xsl:value-of select="properties/property[@name='name']/@value"/></xsl:with-param> -->

                <xsl:with-param name="value"><xsl:value-of select="properties/property[@name='description']/@value"/></xsl:with-param>


            <xsl:call-template name="CreateWsdlDescription">

                <xsl:with-param name="location"><xsl:value-of select="properties/property[@name='bsrURI']/@value"/></xsl:with-param>





    <!-- Abstract element -->

    <xsl:template name="CreateAbstract">

        <xsl:param name="value"/>

        <xsl:element name="abstract" namespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"><xsl:value-of select="$value"/></xsl:element>



    <!-- Description element (for WSDL) -->

    <xsl:template name="CreateWsdlDescription">

        <xsl:param name="location"/>

        <xsl:element name="description" namespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/">

            <xsl:attribute name="referencedNamespace"><xsl:value-of select="$wsdlReferencedNs"/></xsl:attribute>

            <xsl:attribute name="location"><xsl:value-of select="concat($wsdlUrlPrefix, $location)"/></xsl:attribute>






Details about this policy:

Line # Assertion Description
2 Customize SOAP Response Builds SOAP fault response in the event of an error in policy execution
4 HTTP Basic Authentication Challenge [optional] Optionally, this policy can be written to present a HTTP basic auth challenge, passing the credentials directly to WSRR
6-8 Set Context Variables Build the WSRR endpoint -- these values can be made configurable
10 Route via HTTPS Call-out to WSRR repository for all available services (including WSDL location)
11 Apply XSL Transform Convert the WSRR response into a valid WSIL document
12 Return Template Response Return the converted WSIL document to the caller


Step 2. The XSL stylesheet written for Line 11 of the policy transforms the WSRR query response (basically an XML-based list of resources) to an equivalent WSIL document.

For example, the following is a sample WSRR query response:

  <resource bsrURI="787bfd78-a725-452a.a0ac.f4d5e1f4ac63" type="WSDLDocument"> 
      <property name="bsrURI" value="787bfd78-a725-452a.a0ac.f4d5e1f4ac63"/> 
      <property name="name" value="WarehouseSoap.xml"/> 
      <property name="namespace" value="http://warehouse.acme.com/ws"/> 
      <property name="version" value="1.0"/> 
      <property name="description" value="ACME Warehouse SOAP Service"/> 
      <property name="owner" value="wasadmin"/> 
      <property name="lastModified" value="1293039647196"/> 
      <property name="creationTimestamp" value="1293039647196"/> 
      <property name="lastModifiedBy" value="wasadmin"/> 
      <property name="encoding" value="UTF-8"/> 
      <property name="location" value="WarehouseSoap.xml"/> 
      <property name="contentSize" value="7614"/> 
      <property name="xmlns_intf" value="http://warehouse.acme.com/ws"/> 
      <property name="xmlns_wsdlsoap" value="http://schemas.xmlsoap.org/wsdl/soap/"/> 
      <property name="xmlns_xsd" value="http://www.w3.org/2001/XMLSchema"/> 
      <property name="xmlns_wsdl" value="http://schemas.xmlsoap.org/wsdl/"/> 
      <property name="xmlns_impl" value="http://warehouse.acme.com/ws"/> 
      <property name="xmlns_apachesoap" value="http://xml.apache.org/xml-soap"/> 
      <property name="xsdTargetNamespaces" value="http://warehouse.acme.com/ws"/> 


Which is transformed into the following WSIL document: 

<?xml-stylesheet type="text/xsl" href="/ssg/wsil2xhtml.xml"?> 
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/"> 
   <abstract>WSRR WSDL Registry</abstract> 
      <abstract>ACME Warehouse SOAP Service</abstract> 
      <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"  
      <abstract>Test Service 2</abstract> 
      <description referencedNamespace="http://schemas.xmlsoap.org/wsdl/"  


Step 3. Calling the Gateway service directly from a browser will present the following result:

Viewing the WSIL in a browser. Integration with IBM WSRR Tutorial - Layer 7 Technologies

Figure 3.  Viewing the WSIL in a browser

Step 4. Publishing new services on the Gateway via the WSRR-to-WSIL capability.

With the above service configured, it is now possible for the Layer 7 SOA Gateway to deploy services directly from WSRR using the built-in WSIL capability

 Publish a new SOAP service through the Policy Manager. Integration with IBM WSRR Tutorial - Layer 7 Technologies

 Figure 4. Publish a new SOAP service through the Policy Manager


Publish SOAP Service Wizard Dialog. Integration with IBM WSRR Tutorial - Layer 7 Technologies

Figure 5. Publish SOAP Service Wizard Dialog

By default, WSRR enables SSL with HTTP basic authentication - the HTTP Options dialog is used to configure the connection properties to communicate with WSRR.

 Edit HTTP Option

 Figure 6. Configure HTTP(S) options


Publish Service from WSIL. Integration with IBM WSRR Tutorial - Layer 7 Technologies

Figure 7. Publish Service from WSIL

The dialog in figure 7 lists the available SOAP services with accompanying WSDLs. Select the desired service and click "OK" and finish the Publish SOAP Service Wizard.

Integration with IBM WSRR