Creating a Bottom-up Web service from Integration Objects

The instructions in this section assume that you want to create a Web service that has input and output properties and methods similar to all of the properties and methods in an Integration Object. Or, in other words, you want the signature of the Web service that you create to be similar to that of an Integration Object contained in the Web service. This scenario is called a Bottom-up Web service.

To create a Web service, begin from the ZIETrans projects view and follow these steps:
  1. Expand the project that contains the Integration Objects you wish to use, then expand the Source folder and the IntegrationObject folder.
  2. Right-click any Integration Object in your project and select Create Web Service Support Files.
  3. The Create Web Service Support Files wizard enables you to select any project as the source of the Integration Objects you will include in a Web service. The project in which you clicked will be the default. Provide a class name for the ZIETrans Web service support files. The class name must begin with an uppercase letter. This class is referred to as your wrapper class for this Web service. This wrapper class enables you to select a logical group of Integration Objects or EJB Access Beans to include in one Web service. For example, you might select to include all the Integration Objects in a chain in the wrapper class. To see a list of Integration Objects and select the ones to include, click Next.
  4. Select the resources (Integration Objects and EJB access beans) that you want to include in your Web service. If you want to change the input and output properties that are exposed by the Web service for a given resource, select the resource and click Properties.
  5. On the Choose Properties page, select the input and output properties that you want exposed in the Web service. If you wish, you can provide an alias name for the property in the Alias Name field. Use the Select All, Deselect All, and Select Default buttons to help in selecting the properties. Click OK.
    Note:
    1. Defaults for single Integration Objects and EJB access beans are all macro prompts for input properties and all macro extracts for output properties.
    2. Defaults for chained Integration Objects are all macro prompts plus hPubLinkKey (which is required) for input properties and all macro extracts plus hPubLinkKey (which is required) for output properties.
    3. Defaults for chained EJB access beans are all macro prompts plus hPubLinkKey and hPubAccessHandle (both of which are required) for input properties and all macro extracts plus hPubLinkKey and hPubAccessHandle (both of which are required) for output properties.
    4. To specify that Integration Object connection overrides be exposed to the Web service, you must select the appropriate properties, for example the hPubConnectionOverrides or hPubStartPoolName properties, which are not selected by default. For more information, see Specifying Connection Overrides.
    5. For more information about the use of other Integration Object methods, see Programming with Integration Objects.
    6. For considerations when using bidirectional language support, see Support of bottom-up Web services in the ZIETrans User's and Administrator's Guide.
  6. Click Finish. ZIETrans creates a set of classes to be used in creating the Web service. The following classes appear in the ZIETrans projects view in the Source\webserviceclasses folder:
    • The wrapper class that you specified. This wrapper class contains an io_nameProcessWS() method for each Integration Object that you chose to include in the wrapper class. When you create the Web service using Rational® SDP wizards, you are creating a Web service that contains all of the io_nameProcessWS() methods that are contained in the wrapper class.
    • Input properties classes (io_name_Input_Properties) for each Integration Object that you included in the wrapper class. The input properties class is used to set all the necessary inputs for the Integration Object.
    • Output properties classes (io_name_Output_Properties) for each Integration Object that you included in the wrapper class. All of the Integration Object output properties can be retrieved from the output properties class.
  7. At this point, you are ready to create a Web service using the tools provided in the IBM® Rational SDP. Familiarize yourself with the procedure and the options available to you by reviewing the Bottom-up Web services development chapter. At a minimum, you should start the server that you are going to deploy the Web service to before continuing to create the Web service. These instructions assume that you are going to use separate steps to create your Web service, test your Web service, and create your Web service client.
  8. Expand the webserviceclasses package. Right-click the wrapper class that you created, and select Web Services > Create Web service. The Web service type defaults to Bottom up Java™ bean Web service. Make sure that you keep this default. You can click Finish here or select other options that best meet your requirements, as described in the Rational SDP documentation. If you select the option, Generate WSDL file into the project, Rational SDP creates a Web Services Description Language (WSDL) file that describes the interfaces to your Web service. You can use this WSDL file to test your Web service using the Web services explorer in the ZIETrans project view. If you do not select this option, you can use a dynamically generated WSDL file to test your Web service from Services view of the Java EE perspective. When you have made all your choices, click Finish.
  9. Go to Testing your Web service with Web Services Explorer for information about testing your Web service before you create a client.