liufumingren 561cd27f81 初始化
2026-07-25 00:46:47 +08:00

22 lines
562 B
JavaScript

const soap = require('soap');
module.exports = {
async wsdl(methodName, args) {
try {
const wsdlUrl = "http://ye4s.com/webservice/ws?wsdl";
const obj = {};
args.forEach((value, index) => {
obj['arg' + index] = value;
});
const client = await soap.createClientAsync(wsdlUrl);
const result = await client[methodName + 'Async'](obj);
return result[0];
} catch (error) {
console.error('Error calling SOAP service:', error);
throw error;
}
},
async checkRule(path,module){
}
};