How to call SOAP service from Phonegap (iPhone app)

后端 未结 1 1387
我寻月下人不归
我寻月下人不归 2020-12-10 09:30

I am trying to call a SOAP service using this SOAP client but it is not working for me. Please help me. How can I send and receive XML SOAP with Phonegap?

1条回答
  •  轮回少年
    2020-12-10 09:59

    Phonegap is HTML/JS/CSS commonly communicating via XHR/Ajax. It's better to use jQuery Ajax functions. You can get the details here.

    Eg:

    Posting-XML-SOAP-Requests

    AJAX-Requests-Between-jQuery

    Simple jQuery client to call a SOAP web service

    If you find any cross-domain issues (or working in a browser and not working with simulator/device), please refer to the below steps.

    Go to the Resources folder, you can see a file named Cordova.plist. Click on that and you can see the Root elements. Right click on the Root, add a row, set the key as ExternalHosts with type Array.

    Expand the item, and add an item as item0. Give it type string and enter the value as '*'.

    Don't forget to save the Cordova.plist after changes (just use cmd+s).

    0 讨论(0)
提交回复
热议问题