Creating iWay Business Services

In this section:

The following topics describe how to create iWay Business Services, including how to generate WSDL (Web Services Description Language) from a Web service.


Top of page

x
Creating Business Services With Application Explorer

The following procedure describes how to create iWay Business Services using iWay Explorer (iWay Integration Tools version). The procedure uses the mySAP BAPI method called 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 mySAP ERP target. For more information about connection pooling, see the iWay Application Adapter for mySAP ERP User’s Guide.



x
Procedure: How to Create iWay Business Services

The following image shows iWay Explorer in iWay Integration Tools where a connection to mySAP ERP is made using a configured adapter target (MySAP_Target).

The following mySAP ERP application system object categories are listed:

To create iWay Business Services:

  1. Expand the Business Object Repository node.
  2. Expand the Logistics - General, Logistics Basic Data, Material Master, and Material folders.

  3. Right-click the GetList method and select Create iWay Business Service from the context menu.

    The Add Business Service - Select or Create a Business Service dialog box opens.

  4. Select <new service> from the Existing Service Names drop-down list and enter a name in the Service Name field (for example, GetList).
  5. In the Service Description field, type a brief description for the service (optional).
  6. Click Next.

    The Add Business Service - Select Business License dialog box opens.

  7. From the License drop-down list, select the license definition you want to use (for example, test).
  8. In the Method Name field, enter a name for the method.
  9. In the Method Description field, type a brief description for the method (optional).
  10. Click Finish.

    The Business Service Explorer node expands in the iWay Explorer tab and displays the new iWay Business Service that you created.

    All of the available iWay Business Services that were created appear in the Business Service Explorer node. In this example, the GetList method is automatically selected.

  11. Double-click the GetList method.

    The test window for the GetList method opens in the right pane of iWay Integration Tools.

  12. Enter an XML instance of the schema you generated previously for the mySAP ERP business object.

    The document queries the service in the input xml field.

    To use the identical sample input XML illustrated in this example, see Sample iWay Business Services Input XML.

  13. Click Invoke.

    The result appears in the right pane. as shown in the following image.



Example: Sample iWay Business Services Input XML

The following input XML retrieves a list of materials using the mySAP 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>

iWay Software