我在nodejs中使用soap包获得以下代码。我对Node.js完全陌生,不了解细微差别。有人可以让我知道如何使用会话ID并调用下一个方法。
sessionID是我得到的答复。需要使用它来调用下一个方法。
var soap = require('soap');
var url = 'http://hostname/analytics-ws/saw.dll/wsdl/v12';
var args = {name: 'user', password: 'pass'};
var report = {reportpath:'/shared/folder/CKD_gt30'};
var outputFormat = 'SAWRowsetSchemaAndData';
var executionOptions= {async:'true',maxRowsPerPage:2,refresh:'false',presentationInfo:'false',type:1};
var session = soap.createClient(url, function(err, client)
{
client.SAWSessionService.SAWSessionServiceSoap.logon(args, function(err, result)
{
console.log(result);
//console.log(client.describe());
}
);
}
);
soap.createClientAsync(url).then((call) => { return call.XmlViewService.XmlViewServiceSoap.executeXMLQuery(report,outputFormat,executionOptions,session);
}).then((out) => {console.log(out);});