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
-
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.
-
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. -
Transactional RFC (tRFC) and queued RFC (qRFC) are not supported with SOAP.
-
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:
- Start transaction
sicf
- Press F8 or select „Execute“ to start the service maintenance
- Expand the tree from
default_host
up to the node/sap/bc/soap/rfc
- Right-click this node and choose „activate“
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:
Procedure
To use SOAP transport in your application, do the following:
- Create an instance of
SOAPSession
(instead of RfcSession or NWRfcSession) - Instead of
RfcSystemData
, configureHttpSystemData
to set up the connection (see also KB #0008) - To support both RFC and SOAP in your application, use the
ISession
interface, which is shared by all session types.