cancel
Showing results for 
Search instead for 
Did you mean: 

Proxy WS Requests from BAS to On-Premise system

wridgeu
Participant

Hi everyone,

I'm currently struggling to create a working WebSocket connection from BAS (BTP) to an On-Premise SAP System. I want to start the application during development and not only have valid OData requests but also a live WebSocket connection to the On-Premise backend. There isn't any application router or anything like that, just a simple UI5 app running through the FLP sandbox during development.

The "/SAP/BC/APC" path + all sub-paths, is maintained and (Active + WebSocket Upgrade option flagged as described here: https://btp.udina.de/development/websocket.html#cloud-to-on-premise-access-control-ressources - can also be seen in "more official" BAS related docs) within the Cloud Connector.

When the app itself is deployed on the target system, opening the App from within the system using WebSockets works, but when it is to be routed through the UX Tools Proxy Middleware this is not the case and it err's out with:

The OData connections work flawlessly and I'm able to work with them without any issue, only when trying to use WebSockets it seem to cause this. According to this: https://www.npmjs.com/package/@sap/ux-ui5-tooling#proxying-websockets - it looks pretty straight forward. You just enable the WebSocket proxying by setting "ws" to true + have the Cloud Connector maintained accordingly.

Of course within the On-Premise system the ICF paths are also active but it doesn't even get that far from what I can tell.

I'm running the latest version of "@sap/ux-ui5-tooling" which is 1.7.6 at the time of asking this question. The "customMiddleware" section for the "fiori-tools-proxy" looks like this:

Not sure what I'm missing here. Any Ideas, hints or pointers are greatly appreciated! 🙂

Note:

There is a similar, if not exact same question here, sadly without answer: https://answers.sap.com/questions/13518750/establish-websocket-connection-to-on-premise-syste.html

gregorw
Active Contributor

In the documentation of @sap/ux-ui5-tooling that you've linked, I see no "destination" parameter. So maybe the handling of websockets only works when you are in the same network but not in BAS. I would suggest to file an incident via the provided link in the documentation.

cmorrin
Employee
Employee

Thanks for posting your question in SAP community. Our expert is looking into this in the support ticket you raised.

ChrisTh
Explorer

Hello Marco,
I know this is kind of unusual, but reading your question I understand you already solved a problem I am still struggling with (consume an APC from UI5-App deployed to CF).

Maybe you can spare some minutes of your time and have a look at this question:

Consuming APC from UI5 Application running on BTP-CF

Your help is much appreciated.

Best regards,
Chris

View Entire Topic
SebastianFuchs
Explorer
0 Kudos

Please support Customer Influence Request Support of proxying WebSocket requests from BAS to On-Premise systems

Greetings
Sebastian

wridgeu
Participant

Hi Sebastian, I forgot adding the link after creating the Influence Request. Thank you for that! 🙂

Kind Regards,

Marco