I'm trying to consume XML Web Service but I'm getting result.Message undefined in success function. Whats wrong in this code? The error is:
Uncaught TypeError: Cannot read property 'Message' of undefined
Here is my code:
function RequestService() {
$.ajax({
type: "GET",
url: "http://www.brazilmachinery.com/Arquivos/RSS/pt-BR/12.xml",
data: "",
dataType: "xml",
success: function(data) { SucessCallback(data.d); },
error: function(data) { FailureCallBack(data); }
});
}
function SucessCallback(result) {
$('p').html('Resultado: ' + result.Message + ' <br /> Descrição: ' + result.Description);
}
function FailureCallBack(result) {
alert("erro");
}