Reade data from a server API and show in browser. javascrip, xml, soap



I have built a project in Visual Studio MVC and I want to retrieve some data from a URL and put it on my browser. I want to retrieve data from a local server that is built to send data as XML and SOAP using the POST method. The calls that I do is with javascript / Jqurey.


I've been testing several different ways, but without Likas retrieve data from the API. In The APIs are a number of subject is eg GETMACHINS and into GETMACHINS list are such stop, service, alarm, and production. I want to pick these values and show in my browser.


I am new when it comes to retrieve data from URL / server.


I am grateful if someone can help me!



$.get('http://localhost/api_.asmx', function (data) {
//test data till huvud rubriken
var output;
output += '<li>' + data.Stop + '</li>';
output += '<li>' + data.service + '</li>';
output += '<li>' + data.alarm + '</li>';
alert(data);
$('#update_rubrik').html(output);
});

No comments:

Post a Comment