Calls

enaio® data2s 11.0 »

Testing and Implementing Calls

Tests with SoapUI

The SAP® web service should be tested before it is used in a custom application. SoapUI is useful for this.

To do the test, create new project in SoapUI via File/New SOAP Project.

Give the project any name you wish. Insert the WSDL URL previously created in the SOA MANAGER into the Initial WSDL field. SoapUI now loads the WSDL from the corresponding system, which may require logging in to the system. Then a project is generated.

Double-click on the line with the two green arrows to open a popup, where you can enter information about calling the SAP® web service. This is required for the credentials on the target system in any case. These are located in the Service Endpoints tab.

The entries must be confirmed via the Assign buttons. After that, SoapUI asks for which individual requests the setting should apply. All Requests can be selected for the trial period.

The SAP® web service can be called once the login information has been saved. double clicking on the Request 1 line opens a two-part window. On the left, you can see the XML structure with the SOAP content. It must be edited in order to replace the placeholders with specific values. Then the request is sent by clicking on the green triangle icon.

Changing the view from RAW to XML makes it easier to check the results.

Integrating the Calls into Individual Applications

Practically any programming or scripting language can be used to integrate the calls into individual applications. Formulating HTTP(S) requests to the SAP® system and evaluating the responses is sufficient.

When doing so, it does not matter where the respective script/program is executed, as long as it establishes a network connection to the SAP® system.

Calls such as these can be used, for example, in enaio® server scripts, client scripts, or workflow scripts in whichever language you choose (such as JavaScript or VBScript), or in completely independent programs. Information on exactly how to make HTTP calls can be found in the respective documentation for each of the respective programming languages.

If the call is successful, the response returns the function module’s return parameters and can evaluate them. However, the request can also fail due to one of several causes of errors. These must be evaluated by the program making the call: