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.
The following procedure describes how to create iWay Business Services using iWay Explorer. The procedure uses the SAP 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 target.
To create iWay Business Services:
The following image shows the Operations menu in the right pane and a table listing properties and values for the BAPI method called BAPI_MATERIAL_GETLIST.
The Operations menu expands as shown in the following image to display options.
A Create Web Service pane opens where you provide the specific information for the iWay Business Service you are defining as shown in the following image.
A second Create Web Service pane opens on the right that includes fields for the method name and a description as shown in the following image.
The iWay Business Services tab is active on the right as shown in the following image.
All of the available services that were created appear in the left pane. The Material_List service node is expanded, and the GetList method is automatically selected.
The test pane for the GetList method opens in the right pane.
To use the identical sample input XML illustrated in this example, see Sample iWay Business Services Input XML.
Note: For systems based on 6.40 UNICODE, all business object names are case sensitive. As a result, when creating your input XML instance that is based on the schema generated by iWay Explorer, make sure the element names match the business object names as defined by your system.
The result appears in the right pane as shown in the following image.
The following input XML retrieves a list of materials using the SAP 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>
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. The user name and password values that you provided for SAP 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 |