Complex Web service types  Creating new UDDI registry entries

Chapter 4: Building Portlets

Creating Web service portlets

When you create a Web service portlet, you must have access to where that service lives on the Internet. EP allows you to identify Web services that you want to use in a portlet either of two ways—using a service key or using WSDL.

StepsCreating a Web service element using WSDL

Use this procedure to create a Web Studio element that uses the standard Web Services Description Language (WSDL).

  1. Specify the location in which the Web service files will be generated and from where they are exposed.

    1. Open global.properties.xml in WordPad on Windows or in any text editor on UNIX.

    2. Locate the WebServiceRoot property in the UWP property group and modify the default value if necessary. There are two ways to specify where to put the generated Web service files:

      • Enter the absolute location; for example, if you enter d:\work\service\ws on Windows or /work0/service/ws on UNIX, the system adds files directly to the specified location. Ensure that the location can be accessed from a URL, such as http://localhost:8085/onepage/ws.

      • Enter the relative location. For example, if you enter service\ws on Windows or service/ws on UNIX, the system adds files to the location relative to the current Web application; specifically, \work0\tomcat\webapps\onepage\service\ws on Windows or /work0/tomcat/webapps/onepage/service/ws on UNIX. Ensure that the location can be accessed from a URL, such as http://localhost:8085/onepage/service/ws.

  2. Log in to Web Studio and select Build | Portlets from the left pane.

  3. Click the down arrow beside the New icon and select New Aggregated Portlet.

  4. When the Portlet Builder displays, click the down arrow beside the Add button, and select Web Service Element.

    You see the Web Service Element Definition window.

  5. Create a Web service element using WSDL URLs:

  6. Click GetMethod. The system retrieves the WSDL XML. The list of defined services is extracted from the WSDL file and populates the Method drop-down list.

    Select a method from the drop-down list.

  7. Click Preview. The system lists the input parameters of the selected Web service method in the preview pane.

  8. Click Next and enter an element name.

  9. Click Finish.

StepsCreating a Web service element using a service key

This procedure lets you use a globally unique identifier (service key) to reference a Web service in the UDDI Registry. Service keys are hexadecimal strings generated when a Web service is registered with a UDDI registry. For example, when you search the Web service provider for UDDI Web services registries, you see the service key in addition to other information about the service.

Search Rated UDDI

Description: Search UDDI using rated and validated information only. This service looks at all UDDI entries and allocates a weighting to each record depending on validity and completeness. You can then search UDDI registry and retrieve only valid records.

Service Key: 5ad60ec4-846a-4517-b391-724bcbddbe26
Provider: Lucin 
Date Added: Aug 12, 2002 
Average response time: 0.32 seconds 
Price (per transaction): Free 
  1. Log in to Web Studio.

    1. Open Internet Explorer, enter the Web Studio URL in the Address entry field, and press Enter.

    2. When the Web Studio Login window displays, enter your user name and password, then click Login.

    You see the Web Studio Welcome window.

  2. Select Build | Portlets from the Web Studio left pane.

  3. Select New from the Portlet manager toolbar to create an Aggregated Web services element.

  4. When the Choose Portlet Type window displays, select Web services, then click Next.

  5. At the Web Services Element Definition window, create a Web service element using a service key.

  6. Click GetMethod. The system retrieves the WSDL XML. From the WSDL, the list of defined services is extracted and populates the Method drop-down list.

    Select a method from the drop-down list.

  7. Click Preview. The system extracts the input parameters of the selected Web service method and lists them in the preview pane.

StepsPublishing a portlet to a UDDI registry as a Web service

  1. Log in to Web Studio and select Build | Portlets.

  2. In the detail window, select the Approved status, then select the portlet that you want to publish as a Web service.

  3. Click Publish to UDDI on the Portlet Manager toolbar. You see the Publish to UDDI window.

  4. Complete the fields in the Publish to UDDI window:

    When you define a new provider, you see the window where you can enter or update the information about the provider.

    1. Enter or update the information on the Provider Details window:

      • Provider Name – the provider of the Web service.

      • Person Name – the contact person.

      • E-mail Address – the provider’s e-mail address.

      • Provider Description – optional description of the provider.

    2. Click OK.

  5. Complete the remaining fields on the Publish to UDDI window:

  6. Click OK.

The system generates the Web service definition interface, the implementation WSDL files, and the deployment file in the directory specified for the WebServiceRoot property entry in global.properties.xml. You may have to wait for several seconds before the system responds.





Copyright © 2004. Sybase Inc. All rights reserved. Creating new UDDI registry entries

View this book as PDF