Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 09, 2017 at 07:01 PM

    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

    Add comment
    10|10000 characters needed 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.