KB 0014: Using SOAPSession

Advantages

Rfc Connector supports using SOAP transport („RFC over SOAP“) to call BAPIs and other function modules in an SAP system.

The main advantage of this is that you do not need to install the RFC library (DLL) on the target system, therefore this is especially helpful in scenarios where it is not possible or desired to install SAP GUI on the target system, or when you want to reduce dependencies or image size.

Limitations

Due to technical reasons, the SOAP transport has the following limitations

  1. You cannot use function modules which bring up a dialog through SAP GUI. Regular BAPIs must not do that (as per BAPI specification), however customer-defined functions or other standard modules might.

  2. You cannot use kerberos-based Single-Sign-On (SSO). There is simply no way for Rfc Connector to obtain the necessary logon ticket, only SAP‘s RFC library can do that.

    You can, however, use SSO based on X509 client certificates.

  3. Transactional RFC (tRFC) and queued RFC (qRFC) are not supported with SOAP.

  4. It is not possible to implement RFC servers with SOAP.

Prerequisites

You need to enable the service /sap/bc/soap/rfc, if it is not already active:

  1. Start transaction sicf
  2. Press F8 or select „Execute“ to start the service maintenance
  3. Expand the tree from default_host up to the node /sap/bc/soap/rfc
  4. Right-click this node and choose „activate“

    SICF-SOAP.png

You can also use SICF to determine the host name and port for HTTP/HTTPS connection. Usually this is SYSNR+8000, but may be configured differently in a given system.

To show information about the host name and port, press Shift + F12 in the SICF main screen, or select „GoTo“ => „Port Information“ from the menu. A popup will appear showing the hostname and port:

SOAP-port2.png

Procedure

To use SOAP transport in your application, do the following:

  1. Create an instance of SOAPSession (instead of RfcSession or NWRfcSession)
  2. Instead of RfcSystemData, configure HttpSystemData to set up the connection (see also KB #0008)
  3. To support both RFC and SOAP in your application, use the ISession interface, which is shared by all session types.