I am trying to access a web api using node-soap module, but every time i run the code i get following error "Unexpected root element of WSDL or include"
var soap = require('soap');
var xml2js = require('xml2js');
var url = 'https://webservice.servcei.com/LoginXML';
var params = {
Username:'webservice',
Password:'Test123'
};
soap.createClient(url,params,function(err,client){
console.log(err);
});
The "url" variable should point to WSDL, not the web service itself. By convention WSDL should be located on following URL: https://webservice.servcei.com/LoginXML?wsdl
So do following:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With