Invoking Web services by using an automatically generated self-defined operation

This section describes how to use the Web services self-defined operation feature that is included in IBM® WebSphere® Multichannel Bank Transformation Toolkit. The Web services self-defined operation feature automatically generates the self-defined operation that is required to invoke the Web services that you want to use.

Before you begin

If you are retrieving the WSDL file from IBM WebSphere Service Registry and Repository (WSRR), you must first specify the WSRR host address and port number in IBM Rational® Application Developer. For information on setting your WSRR preferences, see the WebSphere Service Registry and Repository section.

About this task

The Web services self-defined operation feature automatically generates the self-defined operation that is required to invoke the Web services that you want to use. Using the Web services self-defined operation feature means that you do not have to manually generate the data and the context for a self-defined operation. The Web services self-defined operation feature also automatically creates data mappings between the data elements belonging to theWebSphere Multichannel Bank Transformation Toolkit operation context and the data elements belonging to the Web services.

Procedure

  1. Launch the New Web Services Connector wizard through the WebSphere Multichannel Bank Transformation Toolkit project in which you want to store the definition files and the Java classes of the Web services connector.
    1. Right-click the WebSphere Multichannel Bank Transformation Toolkit project in which you want to store the definition files and the Java classes for the Web services connector.
    2. Click BTT Tools > Generate Self-defined Operations. The New Web Services Connector wizard opens with the Select WSDL page displayed.
      The Select WSDL page of the New Web Services Connector wizard.
  2. On the Select WSDL page, specify the location from which you must retrieve the WSDL file that describes the Web services you want to invoke.
    Note: If you are retrieving the WSDL file from WSRR, you must first set your WSRR preferences. For information on setting WSRR preferences, refer to the WebSphere Service Registry and Repository section.
    Option Procedure
    If you are retrieving the WSDL file from the Web Select From URL, and then specify the URL of the WSDL file.
    If you already have a copy of the WSDL file on your local workstation Select From Workspace, and then click Browse to select the WSDL file you require.
    If the WSDL file you require is stored in WSRR
    1. Select From WSRR, and then click Browse.
    2. Enter the name of the WSDL file in the Name field or the namespace of the WSDL file in the Namespace field. To do a wildcard search, use the asterisk sign (*) to substitute for words or letters. Click Query.
    3. Select the WSDL file you require, and then click Next.
    4. Select the directory in which you want to save the WSDL file, and then click Finish.
  3. Click Next. The Generate Web Services Client page displays.
    The Generate Web Services Client page.
  4. Generate a Web services client.
    1. In the Output Folder field of the Generate Web Services Client page, click Browse to select the directory in which you want to store the Javaclasses that are required to invoke the Web services.
    2. In the Target Package field, click Browse to select the folder in which you want to store the Java classes required to invoke the Web services.
      Note: If you do not select a folder, the default package will be used.
    3. If you want to generate a portable Web services client, select the Generate portable client check box.
    4. Click Next. The Service Information page displays.
      The Service Information page.
  5. In the WSConnector field of the Service Information page, click Browse to select the class of the Web services connector you are creating.
    Note: Values for the Namespace URI, Service Name, and the Port Name fields are generated automatically according to the WSDL file that you selected in the Select WSDL page. You cannot change the values for these fields.
  6. From the Operations list , select the Web services operation from which you want to derive the automatically generated WebSphere Multichannel Bank Transformation Toolkit self-defined operation.
  7. If you require the automatically generated self-defined operation to contain typed data, accept the default Generated data will use typed data check box selection. If you do not require the automatically generated self-defined operation to contain typed data, clear the Generated data will use typed data check box. For a brief description of typed data, refer to the Derive Self-defined Operations page section.
  8. Click Finish.