cancel
Showing results for 
Search instead for 
Did you mean: 

Outbound communication from SAP Public cloud to a Websocket RFC Server in a fenced customer network

andrzej_rosinski
Explorer
0 Kudos
280

Hello everybody,

is there any possibility to call a outbound service from SAP Public Cloud to a Websocket RFC server that is running in a fenced company network ? I have already called that Websocket RFC server with success but in that scenario the server must be accessible from the internet. 

Maybe there is any way to use a VPN tunnel to get that connection done? Maybe even not with Websocket RFC if that should not be possible but with HTTP or even thru BTP like:

SAP Public Cloud -> BTP (some destination or tunnel) -> external program in a fenced company network (server).

Can such scenario be accomplished at all or is it not possible?

Greetings!

 

 

@simon_luser , @Ulrich_Schmidt  thanks for your replies - update 14.03.25 - in the meanwhile i have installed the Cloud Connector on the machine where my WebSocket RFC Server is running (inside a fenced company network). Sadly i still wasn't able to establish a connection. For now i am not sure if this can be done using the Cloud Connector combined with a WebSocket RFC call from SAP public cloud. The problem is, as i suppose, that in the cloud connector there is no option for a RFC protocoll while selecting the target system "Non-SAP" that is my WebSocket RFC server. the possible option are:

andrzej_rosinski_2-1741948504505.png

Therefore i have selected the TCP protocol that at least does "see" the WebSoclet RFC server running on its port

andrzej_rosinski_1-1741948431063.png

but with that configuration i get no connection to the server. In the monitor view i do not see any throughput for the configured Cloud Connector.

I have also found a blog entry from Thomas Weiss (from 2021 - maybe its outdated?)

https://community.sap.com/t5/technology-blogs-by-sap/websocket-rfc-rfc-for-the-internet/ba-p/1350253... 

that is saying the following:

andrzej_rosinski_3-1741948684851.png

 

So i suppose for the scenario:

--> SAP Public Cloud (embedded steampunk) to WebSocket RFC Server in a fenced company network some different communication type must be used.

Or maybe i am doing something wrong? any ideas?

Greetings!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

View Entire Topic
simon_luser
Product and Topic Expert
Product and Topic Expert

SAP Cloud Connector is meant for that.

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos
To add a few more details: after installing the SCC on the machine of the RFC Server (or in the same network segment), you need to expose the RFC Server's port in the SCC with the extra option of "Allow Websocket Connection" (or similar).
simon_luser
Product and Topic Expert
Product and Topic Expert
0 Kudos

Which RFC connector does your WebSocket RFC server use? Is this another ABAP-based system?

Generally WebSocket RFC is not available in Cloud Connector, if your WebSocket RFC server is ABAP-based you can use classic RFC as mentioned in the blog post.

andrzej_rosinski
Explorer
0 Kudos
Hi Simon, i use the JavaConnector and the WebSocketServer is Java based.
Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert

Hi Andrzej,

so far, I was assuming that you were trying to call the WS-RFC Server from a Java application in SAP Public Cloud, but I guess that was wrong, and you are trying to make the call from an ABAP application (S/4 Hana or Steampunk system), right?

Here the problem is, that neither Simon nor me know exactly, how the configuration in a Cloud ABAP system looks like. I assume, when you tested your WS-RFC Server successfully from an on-premises ABAP system, you went to transaction SM59, created a destination of type "W" pointing to your JCo-Server and then used
CALL FUNCTION ... DESTINATION ...
in an ABAP report, right?

The question now is, how can a corresponding RFC destination be defined in a Cloud system. I think, here you have to configure some kind of "Communication Arrangement". Is it possible to add an HTTP Proxy here? In that case my original idea with an SCC-destination of type HTTP/HTTPS (instead of TCP) and "Allow WebSocket Upgrade" might work.

If not, I have another idea, however, it is a "bit of effort". (Depending on how many function modules your JCo-Server provides, and how "complicated" their signatures are.) HTTP via Cloud Connector is not difficult, and we have another tool that can convert an HTTP request (XML document or simply query parameters, if the function module has no structures/tables) into an RFC call: SAP Business Connector.
We could set up something like this:

  • ABAP code makes HTTP call via SCC to SAP BC
  • SAP BC converts to RFC and calls the WS-RFC Server
  • and then returns the result (e.g. XML,JSon) back to ABAP

If the first approach doesn't work, that might be an option.

simon_luser
Product and Topic Expert
Product and Topic Expert

Hi Andrzej, the best is to open an influence request to get support for this scenario.

andrzej_rosinski
Explorer
0 Kudos
Hi Ulrich, the scenario is to call a outbound service from SAP Public Cloud (embedded steampunk) to Java custom server (Jco Websocket RFC) that is running in a fenced company network. I will try the HTTP approach now even if that means i must abandon the Jco and implement a HTTP server. The Business connector is also a alternative that i will check in the next days. Thanks for the reply.
Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos

> I will try the HTTP approach now even if that means i must abandon the Jco and implement a HTTP server.

Why that? What I meant is, that you can access the JCo Server via the SCC HTTP tunnel. (Therefore the "Allow WebSocket Upgrade" flag in SCC.)

The good thing about WebSocket-RFC is, that it can be tunneled via HTTP Proxy, and the combination of Connectivity Service + Cloud Connector technically just works like an HTTP Proxy. The only problem is, that I am not sure about, whether one can define an HTTP Proxy (hostname & port of the Connectivity Service) in the settings of the WebSocket-RFC destination in Steampunk. (In transaction SM59, destination of type W, you can.) I'll check with a Steampunk expert.

andrzej_rosinski
Explorer
0 Kudos
Hi Ulrich, ok now i understand. I look forward to hearing from you regarding the HTTP Proxy. Normally these things can be configured in the communication system app in the public cloud i think. Many thanks!