Skip to Content
0

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

Aug 08, 2017 at 06:54 AM

68

avatar image
Former Member

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/06ca24043b0f4eb78cf39c6bc1d8a8dc.html) but it didn’t work either.

Best regards

Lukas

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sergio Guerrero Aug 09, 2017 at 07:01 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0