Skip to main content

WebSphere Studio Web Services Explorer: Part 2 -- WSIL

Jeffrey Liu (mailto:jeffliu@ca.ibm.com), Software Developer, IBM Toronto Lab
Jeffrey Liu is a software developer on the Web Services Tools Team at the IBM Toronto Lab. He is responsible for development of the Web Services Explorer. You can reach Jeffrey at jeffliu@ca.ibm.com .
Yen Lu (mailto:yenlu@ca.ibm.com), Advisory Software Developer, IBM Toronto Lab
Yen Lu is an advisory software developer on the Web Services Tools Team at the IBM Toronto Lab. He was one of the developers of the UDDI Explorer and is the architect of the Web Services Explorer. You can reach Yen at yenlu@ca.ibm.com .

Summary:  Part 2 of a three-part series, this article shows how to use WebSphere Studio to discover Web services using Web Services Invocation Language (WSIL) and Web services metadata.

Date:  21 May 2003
Level:  Introductory
Activity:  169 views

Introduction

IBM ® WebSphere® Studio V5 (including Application Developer, Site Developer, and Express) introduces a new tool called the Web Services Explorer. The support for discovery of Web services from Web Services Inspection Language (WSIL) is a new feature in the Web Services Explorer. WSIL support is provided through its own page content. For a definition of page content and an overview of the Web Services Explorer, see WebSphere Studio Web Services Explorer - Part 1: Overview, UDDI, and Favorites.

This article provides an overview of how WSIL fits into the Web service discovery model. It shows you how to use WebSphere Studio to discover Web services using WSIL and Web services metadata. You should have a basic understanding of:

You should also have access to one of the three WebSphere Studio Tools V5 products (Application Developer, Site Developer, or Express) and an Internet connection.


WSIL and Web Service Discovery Overview

WSIL provides a decentralized Web service discovery model. It also provides a way to loosely tie together services offered by different service providers to form a network of Web services. WSIL defines Web services at their point of offering. Businesses have control of what is put into their WSIL document. This allows them to control the quality of the Web services that they expose. For example, they can add information only for the services associated with business partners. Discovery through WSIL then gives them direct access to these services. In contrast to UDDI, this saves them from having to process large volumes of entries. Moreover, they do not have to worry about whether services found in the UDDI registries are truly owned by their business partners rather than someone pretending to own them.

In addition to providing a decentralized Web service discovery model, WSIL also forms a network of Web services through WSIL links. WSIL links are pointers to other WSIL documents. Businesses can reference WSIL documents of their business partners through the use of WSIL links. For example, a WSIL document owned by a car insurance company can have pointers to WSIL documents of all its recommended body shops.

Benefits of WSIL

WSIL is not a replacement of UDDI, and it has less functions than UDDI. You may ask why do we need another specification for the Web service discovery model? WSIL is complementary to UDDI and it addresses some of the limitations of UDDI. The UDDI registries today are far from complete. For example, if you search the public UDDI registries today, many of the services returned to you are invalid. Either the service is no longer available, or it points to malformed WSDLs. The large volumes of out-of-date and duplicate entries in the UDDI registries are other reasons why it is difficult to find legitimate services. Suppose you do find a service, how can you be sure that the service provider is who he or she claims to be? This also raises other issues, such as security, reliability, availability, and so on. All of these limitations drive the need for WSIL.


Getting Started

To use the Web Services Explorer for WSIL discovery, you need to know the location of a valid WSIL document. This section helps you setup a WSIL document on your local WebSphere Studio test environment.

Go to the Download section and download the sample WSIL document, inspection.wsil, to your file system. Create a WebSphere unit test application server to host this WSIL document.

  1. In the WebSphere Studio workbench, select main menu item File => New => Other... to bring up the list of New wizards dialog.
  2. In the left pane of the dialog, select Server. In the right pane, select Server and Server Configurations and then click Next.
  3. Enter server1 and Servers in the Server name: and Folder: fields, respectively.
  4. For the Server type:, choose a WebSphere version 5.0 based test environment (for example, Express Test Environment) and then click Next. See Figure 1.
    Figure 1. Creating a WebSphere unit test server environment
    Creating a WebSphere unit test server environment
  5. On the next page, enter a port for this server. Remember this port and then click Finish to create the server configuration.

Create a Web project to host this WSIL document.

  1. Open the list of New wizards dialog. In WebSphere Studio workbench, select main menu item File => New => Other...
  2. In the left pane of the dialog, click Web. In the right pane, click Web Project and then click Next to proceed to the Web project wizard.
  3. Enter webProject in the Project name: field and click Next.
  4. Enter DefaultEAR as the name of the enterprise application project and click Finish.

Add the DefaultEAR enterprise application project to the WebSphere unit test application server.

  1. Open the list of perspectives dialog by clicking Window => Open Perspective => Other.
  2. In this dialog, select Server and then click OK to open the Server perspective.
  3. If the Server Configuration pane is not present in the perspective, bring it up by selecting main menu item Window => Show View => Server Configuration. In the Server Configuration pane, expand the Servers tab if necessary.
  4. Right click on server1 under the Servers node and select popup menu item Add => DefaultEAR. See Figure 2.
    Figure 2. Adding an enterprise application project to a WebSphere unit test server
    Adding an enterprise application project to a WebSphere unit test server
  5. Copy and paste or import the WSIL document to the Web Content subdirectory of webProject.
  6. If the Servers pane is not present, make it visible by selecting main menu item Window => Show View => Servers. In this view, select the server1 server and click the Start the server button in the toolbar.

You are now ready to test the WSIL page in the Web Services Explorer.


Testing the WSIL Page

Launch the Web Services Explorer by clicking on the Launch the Web Services Explorer icon () in the workbench toolbar. Switch to the WSIL page by clicking on the WSIL page icon () The WSIL page allows you to discover Web service entities that are defined in a WSIL document. It also permits you to work with these Web service entities.

Web service entities that are defined in the WSIL 1.0 specification include WSDL Web services, UDDI businesses, UDDI services, and WSIL links. This section describes how to:

  • Open a WSIL document in the WSIL page.
  • Find your way through a WSIL document.
  • Work with the Web service entities contained in a WSIL document.

Use the WSIL document that you served up in the Getting Started section. The URL is http://localhost:<server port>/webProject/inspection.wsil. To open this WSIL document:

  1. Click on the WSIL Main node in the navigator pane to bring up the Open WSIL Form.
  2. Enter http://localhost:<server port>/webProject/inspection.wsil in the URL to WSIL document text field.
  3. Click Go to explore the WSIL document.

Figure 3 shows the Open WSIL Form.


Figure 3. Open WSIL Form
Open WSIL Form

After the WSIL document is opened, a WSIL node representing the WSIL document is created in the navigator pane. A status message in the status pane indicates the operation is successful.

There are seven operations associated with a WSIL document:

  1. WSIL details
  2. List all WSDL services
  3. List all UDDI services
  4. List all UDDI businesses
  5. List all WSIL links
  6. Import WSIL to file system
  7. Add WSIL to favorites

You can invoke each of these operations by clicking on their associated icons in the Actions pane toolbar. By default, the WSIL details operation is selected. Details include the URL and abstracts of the WSIL document. Figure 4 shows the WSIL Details Form.


Figure 4. WSIL Details Form
WSIL Details Form

Invoking a WSDL Web service

Now that you have opened a WSIL document in the WSIL page, you want to see all the WSDL Web services that are contained within it. Click on the List all WSDL services icon () to bring up the List All WSDL Services Form. Figure 5 shows the List All WSDL Services Form. It has a table of all the WSDL Web services that are contained in this WSIL document.


Figure 5. List All WSDL Services Form
List All WSIL Services Form

We will generate a proxy and a test client to invoke the TemperatureService. Click on the link to the left of http://www.xmethods.net/sd/2001/TemperatureService.wsdl (Item #5). The Actions pane and its toolbar are updated with the operations for a WSDL Web service. This is the WSDL Web service view, as shown in Figure 6.


Figure 6. WSDL Web Service View
WSDL Web Service View

Operations for a WSDL Web service include:

  1. WSDL service details
  2. Import WSDL to workbench
  3. Import WSDL to file system
  4. Launch Web service wizard
  5. Add WSDL to favorites
  6. Exit view

The concept of a view is also applied to other operations for a WSIL document, such as:

  • List all UDDI businesses operation
  • List all UDDI services operation
  • List all WSIL links operation

To invoke this WSDL Web service, launch the Web service client wizard to generate a proxy and a test client.

  1. In the WSDL Web service view, click on the Launch web service wizard icon ().
  2. Select the Web Service Client radio button and click Go. Figure 7 shows the result of launching the Web service client wizard from the WSDL Web service view.
    Figure 7. Launching the Web service client wizard from the WSDL Web service view
    Launching the Web service client wizard from the WSDL Web service view
  3. In the Web Services page, check the Test the generated proxy checkbox and then click on Next.
  4. In the Web Service WSDL File Selection page, the WSDL URL text field should be pre-populated with http://www.xmethods.net/sd/2001/TemperatureService.wsdl. Click Next.
  5. In the Web Service Binding Proxy Generation page, choose webProject in the Project drop-down and then click Finish. Figure 8 shows the Web Service Binding Proxy Generation page.
    Figure 8. Web Service Proxy Binding Generation page
    Web Service Proxy Binding Generation page

    After the Web service client wizard finishes, a proxy and a test client are generated and launched. The default test client is the Web service JSP sample, as shown in Figure 9.
  6. Th TemperatureService takes in an US zip code and returns the temperature in that region. Click on the getTemp(java.lang.String) method in the Methods section, enter 90210 as the zipcode, and click Invoke.
    Figure 9. Invoking a WSDL Web service
    Invoking a WSDL Web service

Launching the Web Service Skeleton wizard

Besides the Web Service Client wizard, you can also launch the Web Service Skeleton wizard to generate a JavaTM bean skeleton for this WSDL Web service.

  1. Select the Web Service Skeleton radio button and click Go to launch the Web service skeleton wizard. The wizard guides you through the generation of a Java bean skeleton.
  2. To save this WSDL Web service for later use, you can import its WSDL document into a workbench project or into the file system. Click on the Import WSDL to workbench icon () or the Import WSDL to File System icon () to invoke each operation, respectively.
  3. Alternatively, instead of importing the physical WSDL document, you can also add this WSDL Web service to favorites by clicking the Add WSDL to favorites icon ().
  4. Finally, to work with other Web service entities contained in the WSIL document, you must first exit from the WSDL Web service view.
  5. Click on the Exit view icon () to return to the List All WSDL Services Form (refer to Figure 5).

Working with UDDI Services

For a list of UDDI services, click on the List all UDDI services icon (). Figure 10 shows the List All UDDI Services Form.


Figure 10. List All UDDI Services Form
List All UDDI Services Form

There are two UDDI services listed in Figure 10. Notice how the first UDDI service differs from the second UDDI service. The first UDDI service is available and you can work with it by clicking its name or the link under the Item # column. The second UDDI service is tagged as unavailable for one of the following reasons:

  • The UDDI registry is currently unavailable
  • The UDDI service was deleted by its owner
  • A malformed WSIL document

Although the second UDDI service is unavailable at this moment, it may be available again at a later time. The Refresh action allows you to poll the status of the service.

  1. Select the unavailable service by clicking on its checkbox.
  2. Click on the Refresh button on the List All UDDI Services Form. See Figure 11.
    Figure 11. Refreshing an UDDI service
    Refreshing an UDDI service

An error message is displayed in the status pane:

 
IWAB0340E Service 4FA28580-5C39-11D5-9FCF-BB3200333F79 not found. 
Make sure both the registry and the service are available. 

The above error is expected because this service is purposely created as an invalid UDDI service. Do not confuse the refresh operation for a WSIL document with the refresh operation for an UDDI service. The refresh operation for a WSIL document is located in the navigator pane toolbar. The refresh operation for an UDDI service is accessed on the List All UDDI Services Form through the Refresh button. Refreshing the entire WSIL document has the effect of refreshing an UDDI service. However, it is usually not desirable to refresh the entire WSIL document because this incurs more network traffic than just refreshing an UDDI service.

In the List All UDDI Services Form, click on the Temperature Service link to enter into the UDDI service view. There are eight operations defined for an UDDI service:

  1. UDDI service details
  2. Import WSDL to workbench
  3. Import WSDL to file system
  4. Launch web service wizard
  5. Add UDDI service to UDDI page
  6. Add UDDI service to favorites
  7. Refresh UDDI service
  8. Exit view

Most of these operations should be familiar. The operation specific to an UDDI service is the Add UDDI service to UDDI page operation (). For a definition of a page content, see Part 1: Overview, UDDI, and Favorites.

Pages are tightly integrated allowing Web service entities discovered in one page to be imported into another. For example, to add an UDDI service to the UDDI page, click on the Add UDDI service to UDDI page icon ().

Figure 12 shows the result of this operation. The Web Services Explorer's page content is switched from the WSIL page to the UDDI page and a new UDDI service node is created in the navigator. You can now perform UDDI specific operations on the UDDI service. For information on how to use the UDDI page of the Web Services Explorer, see Part 1: Overview, UDDI, and Favorites.


Figure 12. Add UDDI Service to UDDI page operation in action
Add UDDI Service to UDDI page operation in action

Return to the UDDI service view by clicking the WSIL Page icon () on the Web Services Explorer toolbar. To exit the UDDI service view, click on the Exit view icon (). This brings you back to the List All UDDI Services Form.


Working with UDDI Businesses

For a list of UDDI businesses, click on the List all UDDI businesses icon (). Figure 13 shows the List All UDDI Businesses Form that contains all the UDDI businesses listed in the currently opened WSIL document.


Figure 13. List All UDDI Businesses Form
List All UDDI Businesses Form

As you can see in Figure 13, there is one UDDI business tagged as unavailable. An UDDI business is refreshed the same way as an UDDI service. Click on the Sybase Portal link to enter the UDDI business view. Figure 14 shows the UDDI Business Details Form.


Figure 14. UDDI Business Details Form
List All UDDI Business Details
  1. UDDI business details
  2. Add UDDI business to UDDI page
  3. Add UDDI business to favorites
  4. Refresh UDDI business
  5. Exit view

All the operations above work in the same manner as those of an UDDI service. We will not go into details for each of them. Click on the Exit view icon () to return to the List All UDDI Businesses Form.


Working with WSIL Links

To see WSIL links contained in this WSIL document, click on the List all WSIL links icon (). To explore the WSIL document referenced by a WSIL link:

  1. Select a WSIL link by clicking on its checkbox.
  2. Click the Add To Navigator button on the List All WSIL Links Form. A new WSIL node is added to the navigator. Figure 15 shows the result.

Figure 15. List All WSIL Links Form
List All WSIL Links Form

Alternatively, you can also open a WSIL link from the WSIL link view.

  1. Enter the WSIL link view by clicking on the link to the left of http://www.xmethods.com/inspection.wsil (Item #1).
  2. Click on the Open WSIL link icon (). See Figure 16.

Figure 16. WSIL link view
 WSIL link view

Finally, when you are finished with a WSIL document, you can remove it from the WSIL page. Use the Clear node operation () located at the navigator pane toolbar.

Alternatively, if you want to save this WSIL document, use the Add WSIL to favorites operation (). Make sure you are not inside a view when you click on the Add WSIL to favorites icon (). Otherwise, you will be adding the view item (WSDL Web service, UDDI service, UDDI business, WSIL link) to Favorites instead.


Conclusion

This article discussed how to use the WSIL page of the Web Services Explorer in IBM WebSphere Studio Tools V5. It covered navigating through a WSIL document and working with the Web service entities. Using the tool significantly simplifies the discovery for WSIL.



Download

NameSizeDownload method
Download file inspection.wsil.004 MBFTP|HTTP

Information about download methods


Resources

About the authors

Jeffrey Liu is a software developer on the Web Services Tools Team at the IBM Toronto Lab. He is responsible for development of the Web Services Explorer. You can reach Jeffrey at jeffliu@ca.ibm.com .

Yen Lu is an advisory software developer on the Web Services Tools Team at the IBM Toronto Lab. He was one of the developers of the UDDI Explorer and is the architect of the Web Services Explorer. You can reach Yen at yenlu@ca.ibm.com .

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=13331
ArticleTitle=WebSphere Studio Web Services Explorer: Part 2 -- WSIL
publish-date=05212003
author1-email=mailto:jeffliu@ca.ibm.com
author1-email-cc=
author2-email=mailto:yenlu@ca.ibm.com
author2-email-cc=

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Special offers