Creating iWay Business Services

In this section:

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.


Top of page

x
Creating Business Services With iWay Explorer

The following procedure describes how to create iWay Business Services using iWay Explorer. The procedure uses the SAP ERP BAPI method called BAPI_MATERIAL_GETLIST as an example and returns a list of materials.

Note: If you want your web service to use connection pooling, you must specify connection pooling information when connecting or reconnecting to your SAP ERP target.



x
Procedure: How to Create an iWay Business Service
  1. In the iWay 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 command, for example, GetList, and click Create iWay Business Service from the menu.

    The Add 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, Material_GetList.
    3. In the Service Description field, optionally type a brief description of the new business service.
  4. Click Next.

    The Select Business License pane opens, as shown in the following image.

  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 (for example, GetList).
    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 Material_GetList link.

    The operations (methods) that are supported are displayed.

  9. Click the GetList link.

    The test pane for the GetList method opens.

  10. In the input xml field, enter an XML request document that queries the iWay Business Service named Material_GetList.
  11. Click Invoke.

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



x
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, Material_GetList, and click Export WSDL from the menu.

  3. In the Select export folder for WSDL dialog box that opens, select the folder in which to store the exported WSDL file.

  4. Click OK when you are done.

    Integration Explorer stores the exported WSDL file in the folder that you selected.



x
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, Material_GetList, 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.


x
Sample iWay Business Services Input XML

The following input XML retrieves a list of materials using the SAP ERP BAPI_MATERIAL_GETLIST method.

  <?xml version="1.0" encoding="UTF-8" ?> 
- <!-- Sample XML file generated by XMLSPY v5 rel. 3 U 
(http://www.xmlspy.com)
  --> 
- <Material.GETLIST xmlns="urn:sap-com:document:sap:business" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="urn:sap-com:document:sap:business 
C:\temp\service_BAPI_MATERIAL_GETLIST.xsd">
  <MAXROWS>1000</MAXROWS> 
- <DISTRIBUTIONCHANNELSELECTION>
- <item>
  <SIGN /> 
  <OPTION /> 
  <DISTR_CHAN_LOW /> 
  <DISTR_CHAN_HIGH /> 
  </item>
  </DISTRIBUTIONCHANNELSELECTION>
- <MANUFACTURERPARTNUMB>
- <item>
  <MANU_MAT /> 
  <MFR_NO /> 
  </item>
  </MANUFACTURERPARTNUMB>
- <MATERIALSHORTDESCSEL>
- <item>
  <SIGN /> 
  <OPTION /> 
  <DESCR_LOW /> 
  <DESCR_HIGH /> 
  </item>
  </MATERIALSHORTDESCSEL>
- <MATNRLIST>
- <item>
  <MATERIAL /> 
  <MATL_DESC /> 
  <MATERIAL_EXTERNAL /> 
  <MATERIAL_GUID /> 
  <MATERIAL_VERSION /> 
  </item>
  </MATNRLIST>
- <MATNRSELECTION>
- <item>
  <SIGN>E</SIGN>
  <OPTION>BT</OPTION> 
  <MATNR_LOW>1000</MATNR_LOW> 
  <MATNR_HIGH>1010</MATNR_HIGH> 
  </item>
  </MATNRSELECTION>
- <PLANTSELECTION>
- <item>
  <SIGN /> 
  <OPTION /> 
  <PLANT_LOW /> 
  <PLANT_HIGH /> 
  </item>
  </PLANTSELECTION>
- <RETURN>
- <item>
  <TYPE /> 
  <ID /> 
  <NUMBER /> 
  <MESSAGE /> 
  <LOG_NO /> 
  <LOG_MSG_NO /> 
  <MESSAGE_V1 /> 
  <MESSAGE_V2 /> 
  <MESSAGE_V3 /> 
  <MESSAGE_V4 /> 
  <PARAMETER /> 
  <ROW>0</ROW> 
  <FIELD /> 
  <SYSTEM /> 
  </item>
  </RETURN>
- <SALESORGANISATIONSELECTION>
- <item>
  <SIGN /> 
  <OPTION /> 
  <SALESORG_LOW /> 
  <SALESORG_HIGH /> 
  </item>
  </SALESORGANISATIONSELECTION>
- <STORAGELOCATIONSELECT>
- <item>
  <SIGN /> 
  <OPTION /> 
  <STLOC_LOW /> 
  <STLOC_HIGH /> 
  </item>
  </STORAGELOCATIONSELECT>
  </Material.GETLIST>

Top of page

x
Identity Propagation

If you test or execute a web service using a third-party XML editor, for example, XMLSPY, the user name and password values that you specify in the SOAP header must be valid. The values are used to connect to SAP ERP. The user name and password values that you provided for SAP ERP when you created a target 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>

iWay Software