1

I want to consume web service whether SOAP or REST api in my Visual studio 2015 apache cordova application. The list widgets which I have on my UI, I want to bind the values retrieved from these web services. How to do so?

Presently I have a API url which provides jaosn data. It would be really helpful to know how its done with it.

Also, if available, provide the link where I can study to do so.

Ro_nair
  • 77
  • 1
  • 10

1 Answers1

2

For web based Application(Cordova), we usually use XmlHttpRequest for data Transfer.

Sample Codes:

var xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function () {
        if (xhttp.readyState == 4 && xhttp.status == 200) {
            document.getElementById("demo").innerHTML = xhttp.responseText;
        }
    };
    xhttp.open("GET", "your api url here", true);
    xhttp.send();

Also, if available, provide the link where I can study to do so.

You can refer to the following links:

Getting Started-AJAX

Using XMLHttpRequest

Elvis Xia - MSFT
  • 10,801
  • 1
  • 13
  • 24