cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to execute a http request or to use a destination in a XSODATA Exit (xsjslib)?

Former Member
0 Kudos
253

Hello colleagues,

I would like to know if it is possible to execute a http request or to use a destination in a XSODATA Exit (xsjslib)? I tried to use $.ajax and XMLHttpRequest but both objects are unknown in a XSODATA Exit and I was unable to import them. I also tried to make use of a destination (like https://help.sap.com/doc/cca91383641e40ffbe03bdc78f00f681/Cloud/en-US/06ca24043b0f4eb78cf39c6bc1d8a8...) but it didn’t work either.

Best regards

Lukas

Accepted Solutions (0)

Answers (1)

Answers (1)

SergioG_TX
Active Contributor

Lukas,

the outbound connectivity works from the xsjslib and xsjs files. you have to follow that same example you posted. $.ajax won't work from the xsjs side bc $ in xs refers to the XSJS API - $.ajax on the client side refers to jQuery.

other possible issues you may be facing may be that your company may be blocking external connectivity calls - so you may need to involve a network team (or firewall) - hope this is your solution

Former Member
0 Kudos

Hi Sergio

Thank you for your fast answer. I am receiving the error that the destination with name "google.xshttpdest" cannot be found. I left the destination_package empty and put the destination in the same folder as the exit. Maybe the problem is that I am using the webide meanwhile the example is made for eclipse.