Skip to Content
avatar image
Former Member

invoke soap web service from sapui5 code

Hello, i need some examples to invoke soap web service from SAP CLOUD PLATEFORM in sapui5

Thx

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 15 at 05:15 AM

    Hi Mohamed,

    You can achieve this functionality by first creating the destination for SOAP web services and after that you can invoke the SOAP service in your application.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hey thx for your help, I have this :

      var oModel = new sap.ui.model.xml.XMLModel();

      var parameter = { "Client" : "300", "Whsenumber" : "11", "TransOrd" : "0017954444" }; oModel.loadData("/sap/sap/bc/srt/rfc/sap/zws_bapi_whse_to_get_detail/300/service/binding", parameter, false);

      And i have this erreur :

      qqq.png (27.8 kB)
      qqq.png (27.8 kB)
  • Mar 19 at 05:15 PM

    Hi Mohamed,

    SOAP services are tricky and a little wild in the sense they need to be called in a certain way in order to work properly.

    You could use a destination on SCP, but it wasn't meant for SOAP services at all. The destination may work for you, but it is not always true for everyone else. I would recommend you call it directly in AJAX (google for it as there are many examples in Javascript - which is fully supported in SAPUI5). Even though hardcoding the URL is not a good practice, I would say the same applies to using SOAP for modern UI technologies such as SAPUI5. You are better off using a REST service instead of SOAP - if you can replace the service.

    If you want to give a try with destinations, please read my response here.

    Regards,
    Ivan

    Add comment
    10|10000 characters needed characters exceeded