3

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?

dda
  • 6,030
  • 2
  • 25
  • 34
subhash kumar singh
  • 2,716
  • 8
  • 31
  • 43
  • possible duplicate of [How call SOAP based web-Service using PhoneGap in iPhone?](http://stackoverflow.com/questions/5974295/how-call-soap-based-web-service-using-phonegap-in-iphone) – outis Jul 19 '12 at 00:36
  • I saw the your mentioned link. I tried that but it doesn't work for me. I want soap specific example. – subhash kumar singh Jul 19 '12 at 07:01
  • That doesn't mean it's not the same question. – outis Jul 19 '12 at 07:05

1 Answers1

7

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

dda
  • 6,030
  • 2
  • 25
  • 34
Shamsudheen TK
  • 30,739
  • 9
  • 69
  • 102