How can I name a web service using phonegap for Android

How to make a webservice call from my telephone application? I found two javascript libraries, one from IBM and another IvanWebService http://wiki.phonegap.com/w/page/43725416/SOAP%20Web%20Service that allow you to make such calls, but I could not get them to launch any of my webservices. I pass the wsdl link as a service link, and I updated the envelope options, still nothing.

+6
source share
2 answers
<head> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" /> <script src="http://code.jquery.com/jquery-1.4.4.min.js"></script> <script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script> <script type="text/javascript"> $(function() { $("#requestXML").click(function() { $.ajax({ type: "POST", url: "http://YOURSITE/script.php", data: "{}", cache: false, dataType: "xml", success: onSuccess }); }); $("#resultLog").ajaxError(function(event, request, settings, exception) { $("#resultLog").html("Error Calling: " + settings.url + "<br />HTTP Code: " + request.status); }); function onSuccess(data) { alert(data); } }); </script> </head> 

Call button of the above method:

 <input id="requestXML" type="button" value="Request XML" /> 
+1
source

Source: https://habr.com/ru/post/897997/


All Articles