Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call SOAP service from Phonegap (iPhone app)

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?

like image 295
subhash kumar singh Avatar asked Dec 31 '25 01:12

subhash kumar singh


1 Answers

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).

like image 61
Shamsudheen TK Avatar answered Jan 02 '26 13:01

Shamsudheen TK



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!