Creating Web service applications

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

StepsCreating a Web service element

Use this procedure to create a Mobile 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 by opening the global.properties.xml file located in:

    Tomcat %SYBASE%\tomcat\webapps\onepage\config

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

  2. Select Build | Applications. Right-click in the detail view and select New Aggregated Application.

  3. In the Application Builder, click the down arrow beside the Add button, and select Web Service Element. You see the Web Service Element Definition window.

  4. In the Web Service Element Definition window, enter:

    Click Next.

  5. If you selected Enable Grid Rules, you see the Define, and Filter windows. Provide the input for each window, and click Next.

  6. In the Finish window, in Element Name, enter an element name, and click Finish.

  7. Save the application. Regardless of the element type, save the element and application as described in “Saving applications”.

StepsCreating a Web service element using a service key

In this procedure, 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 www.bindingpoint.com 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. Select Build | Applications. Right-click in the detail view and select New Aggregated Application.

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

    You see the Web Service Element Definition window.

  3. In the Web Services Element Definition window:

    1. Service Type – select UDDI Key.

    2. UDDI Registry – select the UDDI registry that specified where to look for the key definition.

    3. UDDI Key – enter the Web services key. For example:

      8BD03750-BBE2-11D6-B8B8-000629DC0A7B
      

      You obtain this key from the UDDI Registry where the associated Web service is published.

    4. 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.

    5. Select a method from the Method drop-down list.

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

  4. Click Next.

  5. In the Finish window, enter an element name in Element Name, and click Finish.

  6. Save the application.

    Regardless of the element type, the procedure to save the element and application is the same. See “Saving applications” for instructions.

StepsPublishing an application to a UDDI registry as a Web service

  1. Log in to Mobile Web Studio and select Build | Applications.

  2. In the Application Manager, select Approved, then from the detail view, select the application that you want to publish as a Web service.

  3. On the Application Manager toolbar, click Publish to UDDI. 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 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.