Creating Business Services

Topics:

Business Service Explorer provides web developers with a simple, consistent mechanism for extending the capabilities of an iWay adapter. The iWay Business Services Provider (iBSP) exposes iWay functionality as a number of web services. It serves as a gateway to heterogeneous backend applications and databases.

A web service is a self-contained, modularized function that you can publish and access 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 a black box that may require input while typically delivering a result.

Web services integrate within an enterprise and across enterprises on any communication technology stack, whether asynchronous or synchronous, in any format.

Creating an iWay Business Service

How to:

After you browse the business object repository for an application system, and generate XML schemas for an object that you want to use with an iWay adapter, you can create an iWay Business Service for that object.

The Web Service Description Language (WSDL) file is an XML file that describes the web service documents and provides access to the service. It specifies the location of the service and the operations (or methods) that the service exposes.

You can delete an iWay Business Service that you no longer need.

Procedure: How to Create an iWay Business Service

To create an iWay Business Service:

  1. In the Application Explorer tree, expand the target node to which you are connected and locate the method for which you want to create an iWay Business Service. For example:

  2. Right-click the method, for example, GetMessage, and click Create iWay Business Service from the menu.
    The Add Business Service window in the Select or Create a Business Service dialog box opens, prompting you for information about the new service.
  3. Supply the values for the fields on the dialog box as follows.
    1. From the Existing Service Names drop-down list, click <new service> if you want to create a new service name or select an existing service name.
    2. If you are creating a new service name, type the name in the Service Name field, for example, GetMessage.
    3. In the Service Description field, optionally type a brief description of the new business service.
  4. Click Next.

    The Add Business Service window in the Select Business License dialog box opens.

  5. Supply the values for the fields on the dialog box as follows.
    1. From the License drop-down list, select the license definition that you want to use with this business service.
    2. In the Method Name field, accept the default value or type a descriptive name for the method that the service exposes.
    3. In the Method Description field, optionally type a brief description of the method.
  6. Click Finish.

    Business Service Explorer adds the new iWay Business Service beneath the Business Service Explorer node in the tree.

    The right pane displays the available licenses.

  7. To test the new iWay Business Service, click the test link in the right pane.
    The iWay Business Services that are licensed under test are displayed.
  8. Click the GetMessage link.

    The operations (methods) that are supported are displayed.

  9. Click the GetMessage link.

    The test pane for the GetMessage method opens.

  10. In the input xml field, enter an XML request document that queries the iWay Business Service named GetMessage.

    To view sample XML request documents that can be used for testing purposes, see Sample XML Request Documents.

  11. Click Invoke.

    The result of the test is displayed in the right pane.

Procedure: How to Export a WSDL File

  1. Connect to the Business Service Explorer and expand the tree to locate the name of the iWay Business Service whose WSDL file you want to export.
  2. Right-click the name of the iWay Business Service, for example, GetMessage, and click Export WSDL from the menu.
  3. In the Save As dialog box that opens, select the folder on your file system in which to store the exported WSDL file. By default, Business Service Explorer stores the file in your workspace folder followed by the path that you specify on the Save As dialog box.
  4. Type a name for the exported WSDL file. By default, the file name extension is .wsdl.
  5. Click OK when you are done.

    Business Service Explorer stores the exported WSDL file in the folder that you selected, using the name that you supplied.

Procedure: How to Delete an iWay Business Service

  1. Connect to the Business Service Explorer, and expand the tree to locate the name of the iWay Business Service that you want to delete.
  2. Right-click the name of the iWay Business Service, for example, GetMessage, and click Delete from the menu.
  3. Business Service Explorer displays a prompt, asking you to confirm the deletion of the selected iWay Business Service.
  4. Click OK to proceed with the deletion.

Sample XML Request Documents

Topics:

This section provides sample XML request documents that can be used to test web services that are generated using the iWay Application Adapter for Microsoft Exchange.

Find Appointment

The following sample XML request document finds an appointment in Microsoft Exchange.

<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2011 (http://www.altova.com)-->
<tns:FindAppointments location="Exchange2007/Calendar/FindAppointments" xsi:schemaLocation="http://schemas.ibi.com/iwexchange2007/services FindAppointments_request.xsd" xmlns:tns="http://schemas.ibi.com/iwexchange2007/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <tns:TimeRange>
      <tns:From>2011-10-06T09:30:47Z</tns:From>
      <tns:To>2011-10-07T09:30:47Z</tns:To>
   </tns:TimeRange>
</tns:FindAppointments>

Find Contact

The following sample XML request document finds a contact in Microsoft Exchange.

<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2011 (http://www.altova.com)-->
<tns:FindContacts location="Exchange2007/Contacts/FindContacts" xsi:schemaLocation="http://schemas.ibi.com/iwexchange2007/services file:///E:/QA%20Testing%20Results/612/exchange/contact/FindContacts_request.xsd" xmlns:tns="http://schemas.ibi.com/iwexchange2007/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tns:Contains>
      <tns:Name>Automation</tns:Name>
      <tns:Company></tns:Company>
    </tns:Contains>
</tns:FindContacts>

Send Message

The following sample XML request document sends a message from one contact to another contact.

<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2014 rel. 2 (x64) (http://www.altova.com)-->
<SendMessage xmlns="http://schemas.ibi.com/iwexchange/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" location="Exchange/Inbox/SendMessage" xsi:schemaLocation="http://schemas.ibi.com/iwexchange/services file:///C:/ex/SendMessage_request.xsd">
    <Subject>test qa automation</Subject>
         <Body>No attachmet</Body>
    <FromEmail>iwaytester@ibi.com</FromEmail>
  <To>
      <Email>iwaytester@ibi.com</Email>
  </To>
    <Attachments>
      <Attachment>
        <Name></Name>
        <Contents></Contents>
      </Attachment>
    </Attachments>
</SendMessage>

iWay Software

Feedback