我是肥皂初学者,是第一次使用。我尝试了soap模块。这是我正在尝试的,但是没有运气
index.js
文件
var soap = require("soap");
var url = "http://staging.vmscloud.co/GDMSWS/Orders.svc?wsdl";
var args = { ListOrderType: "Cancelled", sReturnFormat: "xml" };
soap.createClient(url, function(err, client) {
if(err) return;
client.GetOrders(args, function(err, result) {
console.log(err || result);
});
});
以及运行node index.js
{ Error: getaddrinfo ENOTFOUND ws5 ws5:443
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)
errno: 'ENOTFOUND',
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'ws5',
host: 'ws5',
port: 443 }
但是当我打开URL http://staging.vmscloud.co/GDMSWS/Orders.svc?wsdl时会显示XML。我该怎么用?