Understanding iWay Business Services

Topics:

iWay Explorer provides developers with a simple, consistent mechanism for extending the capabilities of the adapter. The iWay Business Services Provider exposes functionality as web services. It serves as a gateway to heterogeneous back-end applications and databases.

A web service is a self-contained, modularized function that can be published and accessed across a network using open standards. It is the implementation of an interface by a component and is an executable entity. For the caller or sender, a web service can be considered as a "black box" that may require input and delivers a result. A web service integrates within an enterprise as well as across enterprises on any communication technology stack, whether asynchronous or synchronous, in any format.

Creating a Web Service

How to:

After you connect to your application system and create an XML schema for a transaction, you can create a web service. The following procedure describes how to create a web service using iWay Explorer.

Procedure: How to Create a Web Service

To create a web service:

  1. Click the iWay Adapters tab.

    The iWay Adapters window opens.

  2. In the left pane, expand the IMS node.
  3. Connect to an IMS target (for example, TCPIP_TCPIP_Connection).
  4. Expand the node to which you connected.

    The Transaction node appears under the connected node.

  5. Click Transactions and then select the transaction for which you want to create a web service.
  6. In the right pane, move your cursor over Operations and select Create iWay Business Service.

    The Create Web Service dialog box opens in the right pane. The following image shows the Create Web Service for Generic_Transaction dialog box which contains three fields for entry.

  7. Enter information that is specific to the web service you are defining.
    1. In the Service Name field, type a descriptive name for the web service.
    2. In the Description field, type a brief description for the web service (optional).
    3. In the License field, select one or more license codes to assign to the web service. To select more than one, hold down the Ctrl key and click the licenses.
  8. Click Next.

    Another dialog box with the Method Name and Description fields opens. The following image shows another Create Web Service for Generic_Transaction dialog box that have two fields for entry.

  9. Enter information that is specific to the method you are defining.
    1. In the Method Name field, type a descriptive name for the method.
    2. In the Description field, type a brief description for the method.
  10. Click Finish.

    The iWay Business Services Provider tab opens. The web service is created and published to the iWay Business Services Provider. iWay Explorer displays the newly created web service under the iWay Business Services folder.

Testing the Web Service

How to:

After a business service is created, test it to ensure that it functions properly. iWay Explorer provides a test tool for testing the business service.

Procedure: How to Test the Web Service

  1. If you are not on the iWay Business Services tab of iWay Explorer, click the tab to access business services.
  2. If it is not expanded, expand the list of business services under iWay Business Services.
  3. Expand the Services node.
  4. Select the name of the business service you want to test.

    The business service name appears as a hyperlink in the right pane.

  5. In the right pane, click the named business services.

    The test option appears in the right pane.

  6. In the input xml field, either enter a sample XML document that queries the service, for example,
    <?xml version="1.0" encoding="UTF-8" ?>
    <IMS>
     <Transaction location="/IMS/Transaction/PART">
       <message>AN960C10</message>
     </Transaction>
    </IMS>

    or browse to the location of an XML instance and click Upload.

  7. Click Invoke.

    The result appears in the right pane.

Generating WSDL From a Web Service

How to:

The Web Service Description Language (WSDL) file is an XML file that describes the web service documents and provides access to the service.

Procedure: How to Generate WSDL From a Web Service

  1. If you are not already in the iWay Business Services tab, click the tab to access business services.
  2. In the left pane, expand the list of services to display the iWay Business Service for which you want to generate WSDL.
  3. Select the business service.

    The hyperlink for the service appears in the right pane.

  4. Right-click Service Description and choose Save Target As.
  5. Choose a location for the file and specify .wsdl for the extension.

    Note: The file extension must be .wsdl.

  6. Click Save.

Example: Viewing WSDL Generated From a Web Service

After generating a WSDL file from the PART.ibs serialized object, the PART.wsdl file looks similar to the following image which is a sample XML file.

Identity Propagation

If you test or execute a web service using a third-party XML editor, for example XMLSPY, the Username and Password values that you specify in the SOAP header must be valid and are used to connect to IMS. The user name and password values that you provided for IMS during target creation using iWay Explorer are overwritten for this web service request. The following is a sample SOAP header that is included in the WSDL file for a web service:

<SOAP-ENV:Header>
  <m:ibsinfo xmlns:m="urn:schemas-iwaysoftware-com:iwse">
    <m:service>String</m:service>
    <m:method>String</m:method>
    <m:license>String</m:license>
    <m:disposition>String</m:disposition>
    <m:Username>String</m:Username>
    <m:Password>String</m:Password>
    <m:language>String</m:language>
  </m:ibsinfo>
</SOAP-ENV:Header>

Note: You can remove the following tags from the SOAP header, since they are not required:

<m:disposition>String</m:disposition>
<m:language>String</m:language>