When my callback function parse the wsdl file and give the response to me I want to show html page in which i want to show list view with parsed data from my node.js request handler.Here is my code,
soap.createClient(AW_URL, function(err, client) {
if (err) {
console.log(err.stack);
return;
}
else {
client.setSecurity(new soap.WSSecurity(auth.login, auth.key));
client.ListProviders(function(err, res) {
if (err) {
console.log(err.stack);
return;
}
else {
var pro = res.Providers[1];
console.log(pro);
}
});
}
});
//var body = html page
response.writeHead(200, {"Content-Type": "text/html"});
response.write(body);
response.end();
so i am stuck with how to wait for the soap client callback function to get the data because before the data come to me html get in-front.Need a help for this.Any suggestion is great help for me.Thanks in advance.