Installing the jUDDI UDDI Server and Publishing WSDL

Installing the jUDDI UDDI Server and Publishing WSDL, Part 2

Publishing WSDL

By Joel Barnum, Descriptor Systems.

Introduction

In this article, you will learn how to publish a service's WSDL to the jUDDI server. This article assumes that you have already completed the steps in  Part 1 , where you install and configure jUDDI.

This article further assumes that you are familiar with SOAP, WSDL and UDDI, as these topics will not be explored here.

Blatant, shameless plug: If you are  not   familiar with SOAP, WSDL and UDDI, I recommend that you get some Web services training from Descriptor Systems. You can find more information atwww.descriptor.com . Thanks!

Here are the software packages you will need, in addition to the packages you installed in  Part 1 :

  • The Apache Axis Web services runtime. You can download Axis from  the Apache website . I used version 1.4.

Installing and Configuring Axis

  1. Install Apache Axis according to the  instructions on the Apache website .
  2. Ensure that you can view the WSDL for the sample Stock Quote Service by opening a Web browser and entering the URL:
    http://localhost:8080/axis/StockQuoteService.jws?wsdl        
            

Publishing the Stock Quote Service's WSDL in UDDI

In this section, you will use the jUDDI console to publish a service in UDDI.

  1. To start the jUDDI console, open a Web browser and enter the URL:

    http://localhost:8080/juddi/console/         
             

    This Web page shows a rudimentary administration console to interact with the jUDDI server.

  2. Since you are going to publish to the registry, you must first authenticate. When you configured jUDDI, the database script defined credentials for a UDDI user named  jdoe   with an empty password.

    Follow these steps to obtain an authentication token:

    1. In the jUDDI console, click on the link  get_authToken   under the  UDDI Publish API   category. This will open a form into which you can enter the SOAP message for the get_authToken UDDI request.

      Please examine the provided template for the SOAP message. Note that "***" are placeholders into which you can enter data.

    2. Find the "***" for  userID   and change the value to  jdoe . Set the  cred   attribute to an empty string since this user has no password.

      Click the Submit button -- the console should display the response message in the lower part of the form.

    3. In the response, in the  authInfo   element, there should be a string that starts with  authInfo . This string is your authentication token that you must provide with any further publishing commands.

      Use the mouse to highlight the text within the  authInfo   element (including the  authInfo:   text) and then start Notepad and paste the authentication token into Notepad.

  3. Next, let's publish a  business entity . In the jUDDI console, on the right side of the window, click the link labeledsave_business   under the  UDDI Publish API   category. Again, the console will display a SOAP message with "***" placeholders into which you can enter data.

  4. You now need to fill in all of the "***" except for the  useType   field. You can use the following values:

    authInfo       Copy and paste the authorization token from the last step
    name           Goliath, Inc.
    description    A big company
    personName     Bill Jones
    phone          555-1212
    email          [email protected]
             

    When you are finished, press the Submit button and study the response message.

    What is the business key that the registry generated for Goliath? Copy and paste it to Notepad.

  5. Next, let's create a tModel for the sample Stock Quote service provided by Axis. Follow these steps:

    1. First, ensure that the WSDL for the service is available. Start another Web browser window and enter:

      http://localhost:8080/axis/StockQuoteService.jws?wsdl             
                   
    2. In the jUDDI console, on the right side of the window, click the link labeled  save_tModel   under the  UDDI Publish API   category. Again, the console will display a SOAP message with "***" placeholders into which you can enter data.

      Enter the following into the "***" (you can leave fields not mentioned here as "***"):

      authInfo      Paste the authorization token from Notepad
      name          http://localhost:8080/axis/StockQuoteService.jws?wsdl
      overviewURL   http://localhost:8080/axis/StockQuoteService.jws?wsdl
      
      Category Bag
      ------------
      
      tModelKey    UUID:C1ACF26D-9672-4404-9D70-39B756E62AB4
      keyName      uddi-org:types
      keyValue     wsdlSpec
                   

      Press the Submit button.

      Looking at the response, what's the unique tModel key that was assigned by the server? Copy and paste it into Notepad.

    3. Here's a discussion of the data you entered:

      • The  name , by convention, is the target namespace of the service as specified in the WSDL
      • The  overviewURL , by convention, is the network addressable URL of the WSDL
      • This  tModelKey   is a well known value that we attach as a category to indicate that our tModel references WSDL. The  keyName   and  keyValue   are also part of this convention.
  6. Finally, we can create a  business service   and associated  binding template . Follow these steps:

    1. In the jUDDI console, on the right side of the window, click the link labeled  save_service   under the  UDDI Publish API   category. Again, the console will display a SOAP message with "***" placeholders into which you can enter data.

      Enter the following into the "***" (you can leave fields not mentioned here as "***"):

      authInfo      Paste the authorization token from Notepad
      businessKey   Paste the business key from Notepad
      name          Stock Quote Service
      accessPoint   http://localhost:8080/axis/StockQuoteService.jws
      tModelKey     Paste the tModel key from Notepad
      overviewURL   http://localhost:8080/axis/StockQuoteService.jws?wsdl
                   

      Press the Submit button.

      Looking at the response, what's the unique service key that was assigned by the server? Copy and paste it into Notepad. Also paste the generated binding key into Notepad

    2. Here's a discussion of the data you entered:

      • The  businessKey   ties this service back to Goliath, Inc.
      • The  accessPoint , by convention, is the service's endpoint URL
      • This  tModelKey   ties the service and binding template to the tModel you created earlier
  7. You have now registered your service into the UDDI registry. A client application could now look up the service, perhaps searching by tModel name, and then locate the WSDL.

你可能感兴趣的:(Install)